Twitter Pixel Destination

About this integration

Twitter Ads helps you promote your content and expand your reach through promoted accounts and tweets. The new Twitter Pixel integration combines the legacy Universal Web Tag and Single Event Tags solutions into one, easier-to-use solution.

Getting started

  1. Go to the Data Pipelines tab and click Connections.

  2. Click Add New under Destinations.

  3. Select the Twitter Pixel destination.

  4. (Optional) Select the sources that you want to connect to this destination. You can always connect sources to your destination later. We’ll only show you eligible sources.

  5. Configure your destination.

    1. Pixel ID: The Pixel ID is a unique identifier for your Twitter Pixel installation. It can be found in the "Tools" -> "Events Manager" section of your Twitter Ads account.

    2. Restricted Data Use: The Restricted Data Use (RDU) parameter enables an advertiser to limit Twitter's use of certain data for specific business purposes only on that advertiser's behalf. More information is available in the documentation.

    Setup your destination
    Setup your destination

  6. Click Enable Destination.

When you’re done, you’ll need to go to the Actions tab and add actionsThe source event and data that triggers an API call to your destination. For example, an incoming identify event from your sources adds or updates a person in our Journeys destination. for each event you want to report to Twitter Pixel.

If you’re migrating from Segment

You’ll notice that our destination has fewer settings than Segment’s. We’ve moved some settings into our Actions, where we think they make more sense. We use Twitter’s current Pixel paradigm. We do not support the legacy Universal Website Tag and Single Event Website Tags web tags.

This means that you must define the events you want to send to Twitter in your Twitter Ads account before you map source data to those events in Twitter generates an event ID for each type of event you want to track, and uses that ID to group and categorize events rather than the simple event name that you send with track calls. You’ll need to provide this ID with each action you set up, so that we can properly map source data to events in your Twitter Ads account.

If you previously used the Universal Website Tag, Twitter has effectively migrated you to Single Event Website Tags. You’ll find the Website Tag for each of your events in your Twitter Pixel Events Manager. You’ll use this tag when you set up actions in


By default, Identify User is the only enabled action. You’ll need to add actions for each event you want to report to Twitter Pixel. We support a number of default Twitter Pixel events, but you can also add custom actions for any events you’ve set up in Twitter Pixel.

When you’re done setting up your destination, you can go to the Actions tab to see how we map source events to your destination.

You may need to add actions for this destination

While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your destination. See our actions page for help setting up actions.

ActionDefault TriggerDescription
Identify User

type = “identify”

Send user data to Twitter Pixel
Track Page View

type = “page”

Track the current page
Track Custom Event

type = “track” and
event != “Products Searched” and
event != “Product Viewed” and
event != “Product Added” and
event != “Order Completed” and
event != “Product Added To Wishlist” and
event != “Checkout Started” and
event != “Payment Info Entered”

Track a custom conversion event
Track Checkout Started Event

type = “track” and
event = “Checkout Started”

Track the Checkout Started event which maps to the InitiateCheckout event to Twitter.
Track Order Completed Event

type = “track” and
event = “Order Completed”

Track the Order Completed event which maps to the Purchase event to Twitter.
Track Payment Info Entered Event

type = “track” and
event = “Payment Info Entered”

Track the Payment Info Entered event which maps to the AddPaymentInfo event to Twitter.
Track Product Added Event

type = “track” and
event = “Product Added”

Track the Product Added event which maps to the AddToCart event to Twitter.
Track Product Added To Wishlist Event

type = “track” and
event = “Product Added To Wishlist”

Track the Product Added To Wishlist event which maps to the AddToWishlist event to Twitter.
Track Products Searched Event

type = “track” and
event = “Products Searched”

Track the Products Searched event which maps to the Search event to Twitter.
Track Product Viewed Event

type = “track” and
event = “Product Viewed”

Track the Product Viewed event which maps to the ViewContent event to Twitter.

Predefined Track Events

We’ve defined a number of ecommerce events for Twitter Pixel based on our own ecommerce specification. If you use our ecommerce specification for other things, you’ll likely want to use these events as well to track conversions in Twitter. These events are all triggered by common event names defined in our ecommerce specification.

For all other events, you’ll want to use the Custom Event Action and set your own trigger based on the Track Event Name. By default, our Custom Event action excludes all of our predefined events, but you may want to set the trigger to simply match on the event name that you send from your sources. Remember: for each event you want to send to Twitter, you need to define it in your Twitter Ads account first.

Set up a Twitter Pixel action

Before you set up a new action, make sure that you’ve defined your event in Twitter Pixel. See Twitter’s Documentation for help setting up new events. When you set up events, you’ll need to get the Website Tag for this event. We don’t expect you to store this pixel in your sources. Rather, you set it up in and we’ll automatically append it to data that we send to your destination.

  1. In your Twitter Pixel destination, go to the Actions tab and click Add Action.
  2. Set your Trigger conditions. In general, you’ll use Track Event Name to determine when we’ll send event data to Twitter.

     For custom events, you should set an is condition

    When you set up a custom event, we assume that you’ll look for any event that is not one of our presets. However, with Twitter, you may simply want to set conditions to Track Event Name is event-you-want-to-track>. With twitter, it’s unlikely that you’ll have a “catch-all” event, because you need to define your events in Twitter first.

    the list of event names we omit on a custom event
    the list of event names we omit on a custom event
  3. Under Data Structure, set your Event ID: this is the Website Tag for the event you defined in Twitter Pixel.
    set the pixel ID for this specific event
    set the pixel ID for this specific event
  4. In the next field down, you can set the Conversion ID. In general, we use the messageId from incoming source events, because it deduplicates source data and ensures that we report unique conversions to Twitter.
  5. Set the Click ID if you want to force conversions to a particular click—like the Add to cart button for added_to_cart events, or something similar. If you don’t set a click target, Twitter will provide the Click ID itself.
  6. Determine the fields that you want to pass to Twitter. You can send all $.properties, or you can select individual event properties. You can also map specific fields for Currency and Revenue.
    add the fields you want to pass to Twitter
    add the fields you want to pass to Twitter
  7. Click Save Action.

Sending product information to Twitter

In general, when you send events containing product information, Twitter expects you to identify products by SKU. But they’ll also support an ID if you don’t have the product SKU. So, when you send an event that contains properties.products, we’ll automatically identify products by SKU if it exists or ID if the SKU does not exist.

You can change this mapping by editing the array of products, but, if you do this, you’ll also want to define the other product keys that you want to pass along to Twitter.

Copied to clipboard!
Is this page helpful?
Chat with AI