C15T Logo

X Pixel (Twitter Pixel)

Track conversions and build audiences for advertising campaigns on X (formerly Twitter).

X Pixel (formerly Twitter Pixel) is X's conversion tracking and audience building tool. It helps you measure ad performance, retarget website visitors, and optimize campaigns on the X platform. By default, c15t loads this script based on marketing consent.

Implementation

import { configureConsentManager } from 'c15t';
import { xPixel } from '@c15t/scripts/x-pixel';

configureConsentManager({
  // ... 
  scripts: [
    xPixel({
      id: '123456789012345',
    }),
  ],
});

xPixelEvent

You can use the xPixelEvent function to track events. This is a wrapper around the twq function that the X Pixel script uses.

import { xPixelEvent } from '@c15t/scripts/x-pixel';

xPixelEvent('tw-xxxx-xxxx', { value: 10.00, currency: 'USD' });

Types

XPixelOptions

Property
Types

Script

Property
Types

XPixelEvent

Property
Types

XPixelContent

Property
Types