How can we help you?

How to Set Up Twitter Pixel?

Last updated on January 26, 2025

Setting up the Twitter Pixel (also called Twitter Website Tag) allows you to track conversions, optimize campaigns, and retarget users who engage with your ads on Twitter. Here’s how to set it up:

Step 1: Access Your Twitter Ads Account

  • Log in to your Twitter Ads account at https://ads.twitter.com.

  • In the top menu, click on Tools, and then select Conversion tracking under the Measurement section.

Step 2: Create a New Website Tag

  • On the Conversion Tracking page, click on Create new tag.

  • Select Website Tag as your tracking option.

  • Give your tag a name (e.g., "My Website Pixel").

  • Click Create tag to proceed.

Step 3: Install the Twitter Pixel Code

  • After creating the website tag, you’ll be given the Twitter Pixel code (a JavaScript code).

  • Copy this pixel code to your clipboard.

Step 4: Add the Pixel Code to Your Website

  • Paste the Twitter Pixel code in the <head> section of your website’s HTML. It should appear on every page you want to track.

  • If you’re using a tag manager, like Google Tag Manager, you can install the pixel through the tag manager interface, which will automatically add it to the pages you want to track.

Step 5: Set Up Event Tracking (Optional)

  • Event tracking allows you to track specific actions on your website, such as purchases, sign-ups, or add-to-cart actions.

  1. Go to your Twitter Ads account and select Conversion tracking.

  2. Click on the tag you just created and choose Create new event.

  3. Select the event type (e.g., purchase, page view, add-to-cart) and follow the instructions to set up the tracking code for those specific actions.

  • You will need to add the event-specific code to the relevant pages (e.g., a "Thank You" page after a purchase).

Step 6: Verify the Pixel Installation

  • After placing the Twitter Pixel on your website, you need to verify that it is working correctly.

  • Use the Twitter Pixel Helper (available as a Chrome extension) to check if the tag is firing on your website.

  • If it’s installed correctly, the extension will indicate that the pixel is active and collecting data.

Step 7: Monitor and Optimize Campaigns

  • Once your Twitter Pixel is installed and collecting data, you can start seeing how your ads are performing in your Twitter Ads account.

  • Use the data to optimize your campaigns, such as adjusting your ad targeting and bidding strategies based on the insights provided by the pixel.


Troubleshooting Tips for Twitter Pixel

  • Pixel Not Firing: Ensure the pixel code is placed correctly in the <head> section of your website and that it’s on every page you want to track.

  • No Data Showing: It may take up to 24 hours for data to show in your Twitter Ads account. If there is no data after that period, check your installation again.

  • Event Tracking Issues: Double-check that the event-specific code is placed on the correct pages where the conversion happens (e.g., purchase confirmation page).


Additional Resources

Did not answer your question?
Contact us