By implementing Twitter Tracking Pixel you can grow your remarketing (a.k.a. Tailored) audiences and show ads for them in particular. Since 2016 September, it’s become much easier to install Twitter pixel with Google Tag Manager due to ready-mage Twitter Universal Website Tag template. In this blog post I’ll show you how to do that.

Moreover, with the tag’s event parameters you can manage advanced conversion tracking with just a few clicks (read more about conversions in this blog post).

Twitter Tracking Pixel - Remarketing with Googe Tag Manager

In case you’re not familiar with Twitter remarketing, it works similar like Google Adwords Remarketing or Facebook Pixel, where a visitor lands on your website and gets a unique cookie (stored in his/her browser). That cookie enables Twitter to automatically recognize that person and retarget him/her with ads.

Google Tag Manager makes it easy for you to add a Twitter Universal Website tag in order to start growing a custom audience.


Before you continue

This blog post assumes you have a working knowledge of Google Tag Manager tags. If you’re a beginner – I highly recommend checking out these free Google Tag Manager courses, first. The minimum requirements are:

  • You have Google Tag Manager tracking code installed on your website.
  • You know what tags, triggers, variables and dataLayer are and how they work in Google Tag Manager.

P.S.  This blog post is a part of more comprehensive guide – Google Tag Manager + Twitter, so if you’re looking for more in-depth information about how to upgrade your Twitter marketing with Google Tag Manager, give it a try.



First, you’ll need to login to your Twitter account, click your profile thumbnail and then navigate to Twitter Ads.

Twitter ads in profile

When you reach your Twitter Ads, click Tools and select Conversion Tracking. If you haven’t set any conversions before, you should see the following message:

Twitter conversion tag is not installed

Twitter universal website tag status will become verified when you add a tag to a website and Twitter will receive at least small portion of data from your site. You’ll be asked to add a Universal Website tag to every page of your website (right before the closing </body> tag). A sample code of Twitter Tracking Pixel will look like this:

twitter universal website tag

Since Google Tag Manager provides a ready-made Twitter tag, all you need is Twitter Tracking Pixel ID. You can find it here:

Twitter pixel ID

Copy it. This ID is required in every Twitter Tag in GTM – just like every Google Analytics tag requires GA Tracking ID (UA-XXXXXX-XX). Let’s create a constant variable for Twitter Pixel ID (because we’ll use it at least several times).

In Google Tag Manager, go to Variables and create new user-defined variable:

  • Title – Constant – Twitter Pixel ID.
  • Type – Constant.
  • Value – Paste Twitter Pixel ID, e.g. aa1x2.

Now open your Google Tag Manager account and create a new tag:

  • Tag type – Twitter Universal Website Tag.
  • Paste Twitter pixel ID.
  • Select Tag Event – Pageview.
  • In Triggering section choose – All pages.

Twitter pageview tag in Google Tag Manager

Hit save and test it. The best way to check the tag is to use Chrome extension – Twitter Pixel Helper. You can read more about it in official Twitter knowledge baseP.S. It might take up to 24 hours for the tag status to change to verified in Twitter Ads account.

Done! You have installed Twitter’s remarketing tag. From now on, all visitors of your website will receive a 3rd party cookie from Twitter, thus your remarketing audience (a.k.a. Tailored audience) will grow. When those visitors with cookies browse Twitter, they’ll see your ads.

Actually, you can take Twitter marketing even further by implementing conversion tracking. Learn more about it in the next blog post –Twitter Conversion Tracking with Google Tag Manager.



  • It may take up to 24 hours for data to appear in Twitter Ads account (but usually it’s processed much faster).
  • Test, test, test before publishing – devil is in the detail. One tiny mistake can lead to huge problems.

I will not go into details how to setup the actual ad campaign in Twitter. You can watch this video instead:



That’s it! You have successfully installed Twitter tracking pixel with Google Tag Manager. It’s actually a pretty easy thing to do but very powerful. Having pixel installed on your website will enable you to grow remarketing lists and show ads to them in particular.

This blog post is a part of more comprehensive guide – Google Tag Manager + Twitter, so if you’re looking more in-depth tutorial about how to upgrade your Twitter marketing with Google Tag Manager, give it a try.

Did I miss something in this blog post? If yes, let me know in the comments!

Julius Fedorovicius

Head of Developer Operations at Omnisend. I am highly interested in Google Tag Manager, Google Analytics, Adwords, Email marketing, Email Deliverability, Digital Marketing in general. You can follow me on Twitter or Linkedin.