Add Twitter tracking conversion pixel

Overview


Track the performance of your Twitter ads by adding a conversion pixel on the confirmation page.

Disclaimer

  • Twitter ad conversion verification may take up to 24 hours

Getting Started


Step 1: Setup the Twitter tracking conversion pixel

https://support.twitter.com/articles/20170807-conversion-tracking-for-websites

Step 2: Retrieve your Twitter tracking pixel ID



Step 3. Add the tracking pixel (below) in the custom confirmation scripts

Remember to replace YOUR_PID with the pixel ID provided by Twitter.
<script> var _twttr = window._twttr || (window._twttr = []);
 
// Load Twitter script
var _loadTwitter = function() {
var interval = setInterval(function() {
if (!_twttr.loaded) {
var twitterScript = document.createElement('script');
twitterScript.async = true;
twitterScript.src = '//platform.twitter.com/oct.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(twitterScript, s);
_twttr.loaded = true;
} else {
twttr.conversion.trackPid('YOUR_PID'); // REPLACE PID WITH YOUR OWN
clearInterval(interval);
}
}, 200);
};
 
_loadTwitter();
</script>

Feedback and Knowledge Base