Before start with this guide, there is everything you will need:
- A Twitter(X) account.
- Log into your ads account at ads.X.com
- Our Twitter(X) Pixel add-on.
- Our Advanced Redirects add-on. Due to Google Analytics cannot track links with 301, 302 or 307 redirect type.
Create a Twitter (X) Pixel code
Visit Conversion Tacking for Websites where you will find a complete tutorial on how to obtain the Pixel ID for your advertising campaign and how to create different events from which you will also obtain a specific ID.
You’ll get a code like the one shown below where you can see the Pixel and Event IDs. You can also find the IDs in the Events Manager section of Ads Manager. In this example, the IDs would be the following:
- Pixel ID: The string a1b2c in twq(‘config’,’a1b2c’).
- Event ID: The string tw-a1b2c-a1b2c in twq(‘event’, ‘tw-a1b2c-a1b2c’, { }).
<!-- Twitter conversion tracking base code -->
<script>
!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',
a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
twq('config','a1b2c');
</script>
<!-- End Twitter conversion tracking base code -->
<!-- Twitter conversion tracking event code -->
<script type="text/javascript">
// Insert Twitter Event ID
twq('event', 'tw-a1b2c-a1b2c', {
});
</script>
<!-- End Twitter conversion tracking event code -->Configure Twitter (X) Pixel settings
You will find the Twitter(X) Pixel settings on your WordPress admin area navigating to the ShortLinks Pro menu -> Settings -> Twitter Pixel.

Projects: Each project will be assigned a Pixel and Event ID, which will be embedded into the URLs generated for that specific project. This identifier enables precise, project-level monitoring. Multiple projects can be created, each with its own Pixel and Event ID, allowing for targeted segmentation, analytics, and customization of link behavior based on the specific requirements of each use case. The fields for project configuration are as follows:
- Name (optional): This field represents the name assigned to the project linked to the Pixel and Event ID. If left blank, the interface will display only the Pixel and Event ID without a project name label.
- Pixel ID: The tracking ID used by Twitter (X) to identify your advertising account
- Event ID: The tracking ID used by Twitter to identify a specific event in your advertising campaign.
Default Pixel ID: You can assign the Pixel ID and Event ID from any of the existing projects to be applied globally across all links.
This default setting can be overridden at the individual link level by specifying a specific project directly within the link’s edit screen.
