Published on

Track events with Tiktok pixel and Google Tag Manager (and purchases)

Track Events with TikTok Pixel and Google Tag Manager (and Purchases)


If you are running TikTok ads, it is crucial to measure their performance. This can be achieved using the TikTok Pixel. In a previous video, I explained how to install the TikTok Pixel with Google Tag Manager. Today, I'll guide you on how to send additional events to it, such as purchases. This data helps you see which TikTok ads perform better.

Introduction

In this video tutorial, you will learn how to track additional events using TikTok Pixel with Google Tag Manager. If you haven't installed the TikTok Pixel base code yet, please refer to our previous tutorial.

Steps to Install TikTok Pixel

  1. Basic Installation:
    • Go to ads.tiktok.com
    • Navigate to Assets > Events > Create TikTok Pixel
    • Copy the provided JavaScript code
    • Paste it into Google Tag Manager in a custom HTML tag
    • Fire the tag on all pages

Sending Additional Events

Setting Up TikTok Pixel Template

  1. Go to Google Tag Manager:

    • Click on Templates
    • In the Tag Templates section, click Search Gallery
    • Search for TikTok and select the template developed by TikTok
    • Click Add to workspace
  2. Edit the Custom HTML Tag:

    • Click on the pencil icon
    • Open Advanced Settings and ensure the tag firing options dropdown is set to 'Once per page'

Creating Event Tags

  1. Create New Tag:

    • Go to Tags > New > Tag Configuration
    • Select TikTok Pixel from the custom section
    • Enter the Pixel ID (found in ads.tiktok.com under Assets > Events)
    • Choose the type of event to send
  2. Example with Complete Payment:

    • Select 'Complete Payment'
    • Refer to TikTok's documentation for supported parameters (e.g., content type, quantity, description, Content ID, currency, and value)
    • Click Use Google Analytics E-commerce Data Layer for enhanced or standard e-commerce data if applicable
    • If using customized data, select Object Properties and configure accordingly

Triggers and Variables

  1. Create Trigger:

    • Go to Triggers > New
    • Choose 'Custom Event' and enter the event name (e.g., eec.purchase)
    • Name and save the trigger
  2. Configure Variables:

    • Create data layer variables for parameters like currency and value
    • Add them to the object properties section in the TikTok Pixel event tag
  3. Test The Setup:

    • Enable Google Tag Manager Preview Mode
    • Ensure tags fire correctly and check the data in the TikTok Pixel Helper Chrome extension
    • Verify events in TikTok Ads Manager under Test Events
  4. Using Standard and Enhanced E-commerce:

    • If using standard e-commerce, follow similar steps but adjust data layer variables accordingly

Advanced Configuration for GA4

If using Google Analytics 4:

  1. Create Variable for GA4 Data:

    • Create a new data layer variable (e-commerce) following the specific structure like transaction information
    • Use a custom JavaScript code to map GA4 data to TikTok Pixel supported structure
  2. Configure Tags:

    • Use the custom variable in TikTok Pixel tags for contents, currency, and value

Final Test

  1. Test and Publish:
    • Run all checks using preview mode
    • Ensure data is sent and received properly
    • Publish the changes in Google Tag Manager

Keywords

  • TikTok Pixel
  • Google Tag Manager
  • Event Tracking
  • Purchase Tracking
  • Data Layer
  • Custom HTML Tag
  • Enhanced E-commerce
  • Standard E-commerce
  • GA4

FAQ

Q1: What are the prerequisites for using TikTok Pixel with Google Tag Manager? A1: Ensure you have the TikTok Pixel base code installed on your site using Google Tag Manager.

Q2: How do I find my Pixel ID for TikTok? A2: Go to ads.tiktok.com, navigate to Assets > Events, and select Web Events. You'll find the Pixel ID there.

Q3: Can I track custom events with TikTok Pixel? A3: As of now, TikTok Pixel does not support custom events; you must choose from the standard event list provided.

Q4: What should I do if my data layer does not follow standard e-commerce or enhanced e-commerce structures? A4: Create specific data layer variables based on your site's e-commerce structure to pass data to TikTok Pixel.

Q5: How do I ensure my TikTok Pixel events are firing correctly? A5: Use Google Tag Manager’s preview mode and the TikTok Pixel Helper Chrome extension to verify event firing and data accuracy. Also, check the Test Events section in the TikTok Ads Manager.

By following these guidelines, you will be able to send additional events to TikTok Pixel effectively, helping you measure the performance of your TikTok ads in greater detail.