weltpixel

TikTok Pixel Events API Addon for Google Analytics 4 PRO

Requires the Google Analytics 4 PRO extension.

Redefining Advertising: TikTok Pixel Events API.

What is TikTok's Events API?

TikTok's Events API is a tool that provides advertisers a secure, direct & reliable bridge between marketing data and TikTok, across web applications, mobile applications and offline sources.

With Events API, advertisers can enhance and maximize the performance of the TikTok Pixel, allowing for the implementation of an extremely powerful marketing strategy, complete with the reliability of a server-side implementation & centralization of data sources.

What are the advantages of using TikTok's Events API?

  • Improved targeting and ad deliverability - With TikTok Events API, advertisers can bypass the obstacles of browser limitations & inconsistencies, ensuring a more accurate and complete dataset is sent to TikTok, which is leveraged for measurement, optimization, and targeting.
  • Granular control over shared data - TikTok's Events API ensures advertisers are only required to share the data that's absolutely necessary in order to meet and exceed marketing goals.
  • Future-proof marketing efforts - Combining a server-side implementation with a frontend TikTok Pixel ensures a sustainable transition into the evolution of the advertising industry.
  • Data consolidation into a single API - Increase efficiency and consistency by sending events to TikTok from all your channels.

How does it work?

Here's a handy diagram to show you how the TikTok Pixel and TikTok Pixel Events API work:

weltpixel

Features of the TikTok Pixel Events API Addon.

  • Server-side Place an Order (Purchase) Event Tracking.
  • Server-side Add Payment Info Event Tracking.
  • Server-side Initiate Checkout Event Tracking.
  • Server-side Add To Cart Event Tracking.
  • Server-side Add To Wishlist Event Tracking.
  • Server-side Search Event Tracking.
  • Server-side View Content Event Tracking.
  • TikTok Pixel Events API Test Mode integration.
  • Ability to track selected events in conjunction with the frontend TikTok Pixel.
  • Directly and fully integrated into the Google Analytics 4 PRO extension.
  • Easy setup, all that's required is the TikTok Pixel ID and the TikTok Pixel Events API Key.

Requirements for using the TikTok Pixel Events API Addon.

To use the TikTok Pixel Events API Addon, you'll need the following:

  • A TikTok Pixel client-side integration, in order to gain access to your TikTok Pixel Tracking Base Code. Our Google Analytics 4 PRO extension comes with the possibility of setting up the client-side TikTok Pixel out of the box, which can be done within minutes.
  • The Google Analytics 4 PRO extension enabled and configured.

How to Install the TikTok Pixel Events API Addon via SSH.

  • Step 1.

    Before starting the installation:

    • Ensure your Magento version is compatible - This extension is currently compatible with the following Magento versions: 2.3.0. - 2.4.7-p3.
    • Install the extension on a testing/development/staging environment first, then, after thoroughly testing it out, install it on a production (live) environment.
    • Make sure the Magento instance is in developer mode. You can use the php bin/magento deploy:mode:set developer command to change the mode to developer and then check to make sure the generated folder in the root of the Magento project is empty.
    • Make sure the Google Analytics 4 PRO extension is already installed and configured on your Magento 2 instance. You can find the steps for doing so in the Google Analytics 4 PRO User Guide.

  • Step 2.
    Copy the extension files to below paths of your Magento 2 instance. If the ‘app/code/WeltPixel’ folder is missing, please create it manually:
    app/code/WeltPixel/GA4TikTokSS

  • Step 3.
    Access the root of your Magento 2 project from the command line and run the following commands:
    php bin/magento module:enable WeltPixel_GA4TikTokSS --clear-static-content
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
  • Step 4.
    Flush any caches that you might still have enabled on your server or in Magento.
  • Step 5:
    If your store was in production mode before starting the installation, make sure to switch it back to production mode by running the following command in the root of your Magento installation: php bin/magento deploy:mode:set production.
  • Step 6:
    Awesome! The extension is now installed on your Magento store! Congrats!

How to Upgrade the extension.

  • Step 1.
    Remove the extension code under app/code/WeltPixel/GA4TikTokSS before adding the new extension files. The extension may be refactored and old unused files may cause random issues, so it's best to only keep the latest version of the files.
  • Step 2.
    Follow the normal installation instructions above.

How to configure the TikTok Pixel Events API Addon.

  • Enable TikTok Pixel Server Side Tracking - When enabled, the server-side TikTok Pixel functionality will use the TikTok Pixel Javascript Tracking code configured in the client-side configuration section.
  • TikTok Pixel ID - This ID can be found in your TikTok Ads Manager account under Tools → Events → Data Sources → Pixel ID. You can also find it in your TikTok Base Pixel Javascript Tracking code in the section above, in the ttq.load() function.
  • TikTok Events API Key - The Events API Access Key (token) can be generated in the TikTok Pixel settings. You can follow TikTok's documentation for instructions on how to manually generate a token.
  • Track Events - Select the events you wish to send to TikTok via the Events API: Place an Order / Add Payment Info / Initiate Checkout / Add To Cart / Add To Wishlists / Search / View Content
weltpixel
weltpixel
  • Send enabled events via the frontend TikTok Pixel as well - Set this option to Yes if you want to send events via the frontend TikTok Pixel as well. TikTok Ads Manager should have built-in functionality to avoid data duplication, and this may (in some cases) enrich your data.
  • Enable Test Mode - This functionality can be used to send test events to the TikTok Pixel. Find your Test Code in the Test Events section of the TikTok Pixel configuration and paste it below. Any event sent will then be marked as a test event and will show up instantly in the Test Events section. Remember to disable this option when you're finished testing.
  • Test Event Code - This code may change periodically, so make sure you double-check it in the TikTok Pixel Test Events section after disabling and re-enabling Test Mode.

Change Log.

v.1.10.1 - November 14, 2024

weltpixel