Twitter is a powerful tool for businesses to connect with their audience, promote their brand, and drive engagement.
Analyzify provides tracking tags for general use, such as page views, search, leads, and subscriptions, as well as tags specifically for e-commerce activities, such as add to cart, begin checkout, payment info, and purchase for Twitter Ads.
How to Activate Twitter Pixels on GTM?
Now let's deep dive into activating Twitter tags through your GTM container.
Go to ads.twitter.com > Tools > Events Manager. Copy your Pixel ID (Web ID).
Head to GTM Admin > “Variables” > “User-defined Variables”, and click on “constant - Twitter Pixel ID”. Enter your ID into the value area and save the changes.
Choose the Twitter Base tag. Then, click the "PLAY" icon on the top-right corner and save the changes.
Now go back to ads.twitter.com. Click the “Add events” button.
You’ll need to create events to track actions across your website. Choose "Add to cart, Purchase, Begin Checkout, Page View - All Pages" from the dropdown list.
Choose the "Define event with code" option.
Please select the parameters you wish to track in this field. For reference, please take look at the Analyzify GTM Container: Twitter Tags table below the page.
At this stage, a unique ID is generated for each event that is created. These IDs are then utilized for the Event ID fields in the corresponding tags on the Google Tag Manager (GTM).
By referring to the events overview, you can easily identify each event and its respective ID. See the example below for a visual representation.
Before activating the event tags in Google Tag Manager (GTM), you need to update the relevant Event ID for each tag.
Head to GTM Admin > “Variables” > “User-defined Variables”, and then search for the Twitter tags you wish to activate.
Once you have located the desired tags, update the Event ID associated with each tag to ensure they fire correctly. Please see the example below:
Please be sure to update the corresponding Event ID for each event tag before activating them; otherwise, there will be no data flow.
To activate the tags that you have added an event ID to in Google Tag Manager, simply select them and click the "Play" button.
You can repeat this process (step 9 and 10) for other tags as well, such as Purchase, Begin Checkout, and Page View - All Pages.
After that, you can submit your changes by clicking the "Submit" button.
Once you're done making all the necessary changes, provide a new container name and publish it to ensure that the changes take effect.
Analyzify's GTM Container: Twitter Tags
Here are the Twitter tags available in Analyzify's GTM container, including standard tags for page tracking and e-commerce tags for add-to-cart, purchase, and more.
Standard Tags
Base Code |
It is the installation tag. It works on all pages. |
constant - Twitter Pixel ID |
|
Page View |
Used for page tracking. It works on all pages. |
constant - Twitter - Pageview - Event ID |
E-commerce Standard Tags
Add To Cart |
Fires when the add to cart button on the listing or product detail page is clicked. Third-party apps (Cart Drawer, Subscriptions) or theme customizations may affect this event behavior. |
constant - Twitter - Add To Cart - Event ID |
Parameters: Value, Currency, Product Type, Product Name, Product Id, Product Price, Product Quantity, Product Group Id |
Begin Checkout |
Fires when the Checkout button on the cart page or Cart Drawer (if supported) is clicked. |
constant - Twitter - Begin Checkout - Event ID |
Parameters: Value, Currency, Product Type, Product Name, Product Id, Product Price, Product Quantity, Product Group Id |
Add Payment Info |
Fires at the checkout payment detail step. |
constant - Twitter - Add Payment Info - Event ID |
Parameters: Value, Currency, Product Type, Product Name, Product Id, Product Price, Product Quantity, Product Group Id |
Purchase |
Fires when the payment is successful. |
constant - Twitter - Purchase - Event ID |
Parameters: Value, Currency, Transaction ID, Product Type, Product Name, Product Id, Product Price, Product Quantity, Product Group Id, User Email, User, Phone number, User Shopify Id |
Other Tags
Search |
Fires when the visitor searches. |
constant - Twitter - Search - Event ID |
Parameters: Search String |
Lead |
Fires when the user submits the contact form. |
constant - Twitter - Lead - Event ID |
|
Subscription |
Fires when the user submits the newsletter form. |
constant - Twitter - Subscription - Event ID |