Skip to content
Help
Marketing and tracking

X pixel and Conversion API: how do I track my X (Twitter) ads?

Set up the X browser pixel (Twitter pixel) and the X API conversion app (X Conversion API): find your Pixel ID in X Ads Events Manager, add the API key, API key secret, access token, and access token secret, and choose Lead or Purchase.

3 min read

What these apps do

  • X browser pixel: adds the X pixel (Twitter pixel) to your store, so X sees what shoppers do in their browser.
  • X API conversion: sends your orders to X from Storeep's servers through the X Conversion API.

Use both with the same pixel. How they work together is explained in What is the server-side Conversion API (CAPI) and why use it?

Before you start

  • An X Ads account (ads.x.com).
  • An X pixel from Events Manager in X Ads. Copy its Pixel ID, a short code of letters and numbers such as o8z6j.
  • For the API conversion app: an app in the X Developer Portal with Ads API access. From that app you need four keys: the API key, the API key secret, an access token, and an access token secret. The access token must belong to a user who can manage your ad account.

Set up the X browser pixel

  1. Open Apps, find X browser pixel, and click Install.
  2. Open the app and click Add new pixel.
  3. Keep Activate on, type a Pixel name, and paste your Pixel ID.
  4. Pick your Markets and the Conversion event type: Lead (default) or Purchase.
  5. Click Add.

The shared fields are explained in How do browser pixels work in Storeep?

Set up the X API conversion

  1. Install X API conversion from Apps, open it, and click Add new pixel.
  2. Keep Activate on. Turn on Abandoned orders only if you want recovered abandoned orders sent too.
  3. Type a Pixel name and paste the same Pixel ID as your browser pixel.
  4. Pick the same Markets and Conversion event type.
  5. Paste your four keys into API key, API key secret, Access token, and Access token secret.
  6. Click Add.

What X receives

  • From the browser: a page view, ViewContent, AddToCart, Search, InitiateCheckout, a Lead when someone sends your contact form, and your conversion event on the thank-you page.
  • From the server: your conversion event for each order and a ViewContent for the first product, collection, or landing page a visitor opens.
  • Server order events include the value, currency, and the buyer's email and phone in hashed form.

X receives the value in your store currency.

Avoid double counting

Storeep gives the browser and server copies of each order the same conversion ID, so X can count it once. Use the same Pixel ID and event type in both apps.

Test your setup

The X apps have no test mode in Storeep. Place a real test order, then check your pixel's activity in X Ads Events Manager. It can take some time for events to appear. Cancel the test order afterwards.

Common problems

  • "The pixel id you have entered is incorrect": paste only the Pixel ID, not the pixel code.
  • "The API key you have entered is incorrect" (or the secret or token): copy the key again from the X Developer Portal, without spaces.
  • Server events stopped: the keys were regenerated or the developer app lost Ads API access. Paste the new keys into the entry.

Still need help?

Write to us and we will answer you.

Contact us