User Tools

Site Tools


Sidebar

magento_2:x_twitter_pixel

For more details see how the X (Twitter) Pixel for Magento 2 extension works.

Guide for X (Twitter) Pixel for Magento 2

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.

  • Select and activate actions (events) you want to track
  • Use events to establish conversion goals for your ad campaigns
  • Generate audiences based on event completions
Magento 2 X (Twitter) extension is compatible with Hyvä Theme. You can find the amasty/module-pixel-x-hyva package for installing in composer suggest.
Refer to this official documentation for detailed information on pixel and conversion tracking setup on the X Ads business account side.

General Settings

Navigate to StoresConfigurationAmasty ExtensionsX PixelGeneral 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.

Please activate this feature only when reviewing event data, and be sure to disable it after debugging to avoid impacting site performance. We recommend turning off the Log All Events Data feature when not in use to conserve disk space.
It is important to note that only information about active X (Twitter) pixels is included in the logger. However, if the page is being cached, the logging process in the debugger might not occur. Make sure to consider the caching settings while testing the logging events data for accurate event tracking and troubleshooting.

'Manage Pixel IDs’ grid

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 MarketingX PixelManage Pixel IDs.

If necessary, you can assign a unique Pixel ID to each store view and collect event data separately.

Add and Edit X Pixels

General

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.

X Pixel Events

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:

  • Category View
  • Product View
  • Checkout Initiated
  • Purchase
  • Search
  • Add To Cart
  • Add To Wishlist
  • Lead
  • Added Payment Info
  • Subscribe

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 (ToolsEvents ManagerEvents table → Add events button).

Please note that the extension tracks prices in your store's base currency.

Troubleshooting and verification

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 ToolsEvents ManagerEvents 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.

Rate the user guide
 stars  from 0 votes (Details)
magento_2/x_twitter_pixel.txt · Last modified: 2024/09/23 08:59 by kkondrateva