Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/managed-components/twitter
Twitter Analytics Tool
https://github.com/managed-components/twitter
Last synced: 2 months ago
JSON representation
Twitter Analytics Tool
- Host: GitHub
- URL: https://github.com/managed-components/twitter
- Owner: managed-components
- License: other
- Created: 2022-06-09T10:25:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T14:27:57.000Z (6 months ago)
- Last Synced: 2024-09-19T18:08:59.631Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 531 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zaraz - Twitter
- awesome-zaraz - Twitter
README
# Twitter Pixel Managed Component
Find out more about Managed Components [here](https://blog.cloudflare.com/zaraz-open-source-managed-components-and-webcm/) for inspiration and motivation details.
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
[![Released under the Apache license.](https://img.shields.io/badge/license-apache-blue.svg)](./LICENSE)
[![PRs welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)## 🚀 Quickstart local dev environment
1. Make sure you're running node version >=18.
2. Install dependencies with `npm i`
3. Run unit test watcher with `npm run test:dev`## 🧱 Fields Description
### Twitter Pixel ID `number` _required_
`txn_id` is the unique identifier of your Twitter Pixel. You can find it inside the Twitter snippet, as `twq('init','twitter_pixel_id');`. [Learn more](https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html)
## ⎙ Embeds
### Post
This Managed Component uses the [Embeds API](https://managedcomponents.dev/specs/embed-and-widgets/embeds) to render tweets on a web page, with its embed `twitter-post`. This Embed accepts the folowing parameters:
#### Tweet ID _required_
Specify the post you wish to render using the `tweet-id` parameter. You can find the tweed ID in the URL when you open it in the browser.
---
**Examples:**
1. To place an embed on a page using WebCM, use a placeholder div element with the following attributes:
```html
```2. To place an embed on a page using Cloudflare Zaraz, use a placeholder `twitter-post` HTML element with the following attributes:
```html
```
### Support
This Managed Component only supports the display of the tweet’s text, account and profile information, date and time, as well as likes, replies, and other engagement metrics.
◊## 📝 License
Licensed under the [Apache License](./LICENSE).
## 💜 Thanks
Thanks to everyone contributing in any manner for this repo and to everyone working on Open Source in general.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Simona Badoiu
💻
Yo'av Moshe
💻
Ruskin
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!