How to Add a Twitter Website Tag for Remarketing with Twitter Ads

Twitter Website Tag for Remarketing

Do you currently use Twitter Ads to market your products or services? Have you thought about increasing your social media presence?

Twitter Ads are a great way to increase your reach. You can run a campaign to gain more followers, drive traffic to your website or promote your most popular tweets.

Twitter Ads comes with lots of targeting options built-in, but there’s one thing you can do to segment your audience even further. Twitter remarketing allows you to target ads to people who have visited your website, or taken a certain action on your site. Before you can target ads to these people, you need to add a Twitter website tag to your website. Let’s walk through how to do that.

↓ Jump to video tutorial ↓

This tutorial is for adding a UNIVERSAL Twitter website tag that appears on every page of your site. If you’re looking to create a tag for a single event, pageview, purchase, etc., I’ll be creating another tutorial on that soon.

Add a Twitter Website Tag to your Site

  1. Login to your Twitter account
  2. Click on your profile image, and go to Twitter Ads

Twitter navigation: Twitter Ads

  1. Go to Tools > Conversion tracking

Twitter navigation: Tools > Conversion Tracking

  1. On the right, under “How to Start,” check the box to agree to Twitter’s advertising policy
  2. Click Generate website tag for conversion tracking

Getting started with Twitter website tag

  1. Copy the website tag to your clipboard

Twitter website tag code

Add Twitter Website Tag using a WordPress Plugin

  1. Install & activate the Insert Headers and Footers WordPress plugin
  2. Go to Settings > Insert Headers and Footers
  3. In the Scripts in Footer section, paste your Twitter website tag

Add Twitter website tag with WordPress plugin

Add Twitter Website Tag with Google Tag Manager

This assumes you already have Tag Manager installed on your website. If not, check out my tutorial on How to Install Google Tag Manager on WordPress.

  1. Login to your Google Tag Manager account
  2. Click on your container
  3. Click Add a new tag
  4. Give it a name. I recommend “Twitter Universal Website Tag”
  5. Choose Custom HTML Tag
  6. Under Configure Tag, paste your Twitter website tag into the box
  7. Under Fire On, choose All Pages
  8. Click Create Tag
  9. Don’t forget to publish your container when you’re done

Add Twitter Website Tag to your WordPress Theme

  1. In your active WordPress theme, open the footer.php file
  2. Locate the </body> tag
  3. Paste the Twitter website tag just above the </body> tag

NOTE: If you switch WordPress themes in the future, be sure to copy this and place it in your new theme, otherwise it’ll stop working. I recommend using Google Tag Manager or a WordPress plugin instead.

Verify your Twitter Website Tag is Installed & Tracking

After you’ve installed your tag, you’ll want to make sure it’s tracking properly. Wait a few hours, and then return to your Tools > Conversion Tracking page in the Twitter Ads dashboard. Look to see if your tag is Unverified or Tracking. If it’s been more than 24 hours, and you’ve been receiving traffic on your website, and it still says “Unverified,” see the troubleshooting guide.

Twitter Conversion Tracking status page

Twitter Website Tag Video Tutorial


I hope you enjoyed this tutorial on how to add the Twitter website tag to your site. If you have any trouble, please let me know in the comments.

2 Commentson "How to Add a Twitter Website Tag for Remarketing with Twitter Ads"

  1. /

    Great value as always from WpSmackdown! Thank you for breaking down this complicated process! While Facebook ads have proven really useful for driving leads I think Twitter ads are going to become an amazing complement to content marketing. Great to have this step by step set up :).

    → Reply
    1. (Author) /

      Thanks Kayla!

      I just setup the Twitter website tag on WP Smackdown so that I can test out some remarketing soon. I’ll be writing about the entire process, from creating an audience to setting up the ads to the results. For marketing, WordPress, etc., I have a feeling Twitter ads might prove more helpful than Facebook. The data will tell us…

What Are Your Thoughts?

All fields are required. Your email will not be published.

You can use standard <code> and <pre> tags to post code examples, or a service like codepen.io.