For more details see how the X (Twitter) Pixel for Magento 2 extension works.
Easily integrate the X (Twitter) Pixel into your Magento 2 store to enable proper and precise tracking of ad performance. Uncover key data about user behavior and preferences and leverage this information to fine-tune your marketing strategies for better results.
Navigate to Stores → Configuration → Amasty Extensions → X Pixel→ General to begin the extension setup.
Enable X Pixel - Choose Yes to activate the extension and make the Log All Events Data setting available for configuration.
Log All Events Data - When enabled, all frontend event data sent to X Ads will be stored in the /var/log/x_pixel.log file.
From this convenient grid, you can add new X (Twitter) Pixel IDs by clicking the Add New Pixel button as well as manage and start editing existing ones by selecting the Edit option in the Action column.
To view the grid, follow the path Marketing → X Pixel → Manage Pixel IDs.
If necessary, you can assign a unique Pixel ID to each store view and collect event data separately.
Is Enabled - switch to Yes if you’d like to activate this specific X pixel.
Pixel ID - paste the X Pixel ID copied from your X Ads account into this field.
To locate and copy the X Pixel ID, head to Tools → Events Manager in the top menu of your X Ads account. If you have already created the pixel there, its ID will be visible in the left sidebar. You can also find and copy it from the right panel or after clicking the View Twitter pixel button.
To create a new pixel (if none exists), click the Add event source button.
Store View - Select the store view(s) to where the X Pixel will be applied.
With the X (Twitter) Pixel extension installed, you can manage what specific user actions will be captured on your website as events. The following is a list of events available for tracking via the extension:
Next to each event, you must specify its corresponding ID from your X Ads account. This means the event of the matching type must first be created in your X Ads account (Tools → Events Manager → Events table → Add events button).
After the X Pixel implementation, to make sure that it works correctly, you can use the following tools:
1. X (Twitter) Pixel Helper browser extension
You can install this browser extension on Google Chrome and then activate it on your website's frontend.
2. Recent Activity Log in your X Ads account
Go to Tools → Events Manager → Events table, click the three dots near the event you’d like to check, and choose the View Activity option from the dropdown.
Find out how to install X (Twitter) Pixel for Magento 2 via Composer.