Published on

How to set up TikTok pixel and Event API. Browser and Server. A to Z Guide 2024. Google Tag Manager.

How to set up TikTok pixel and Event API. Browser and Server. A to Z Guide 2024. Google Tag Manager.


Introduction

In this comprehensive guide, we'll walk you through the process of setting up TikTok Pixel and Event API through Google Tag Manager (GTM) from start to finish. This setup includes integrating your TikTok Pixel with eCommerce events, configuring Google Analytics, and verifying that all parameters are accurate and effective.

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Initial Setup
    • Creating TikTok Business Manager Account
    • Configuring TikTok Pixel
    • Google Tag Manager Setup
  4. Integrating Event API
    • Advanced Settings
    • Adding Standard and Custom Events
  5. Variable Configuration
    • Setting Up eCommerce Variables in GTM
    • Defining Custom JavaScript
  6. TikTok Tags Configuration
    • Viewing Content
    • Adding to Cart
    • Checkout Initiation
    • Purchase Confirmation
  7. Testing and Debugging
    • Using TikTok Pixel Helper
    • Preview and Debug Mode
  8. Final Steps
    • Publishing the Container
    • Verifying Event Firing
  9. Conclusion

Prerequisites

  • Active TikTok Business Manager account
  • Google Tag Manager (GTM) account
  • Website with eCommerce functionality

Initial Setup

Creating TikTok Business Manager Account

  1. Go to TikTok Business Manager and create an account.
  2. Note down your account number for future reference.

Configuring TikTok Pixel

  1. Set up a TikTok Pixel by navigating to Events Manager.
  2. Create a new Pixel and follow recommended settings.
  3. Note down the Pixel ID.

Google Tag Manager Setup

  1. Log in to your Google Tag Manager account.
  2. Create a new container for your desired website.

Integrating Event API

Advanced Settings Recommends

  1. Customize event parameters as recommended (e.g., content type, quantity, description).
  2. Save and proceed.

Adding Standard and Custom Events

  1. View Content
  2. Add to Cart
  3. Checkout Initiation

Variable Configuration

Setting Up eCommerce Variables in GTM

  1. Create variables for item ID, item name, price, currency, etc.
  2. Configure JavaScript to fetch values dynamically from the data layer.

Defining Custom JavaScript

  1. Create custom JS for item attributes like name, brand, price, and category.
  2. Save each custom variable.

TikTok Tags Configuration

Viewing Content

  1. Configure the TikTok Pixel to track 'View Content' events.
  2. Set parameters like content type, item ID, and category.

Adding to Cart

  1. Create a tag to track 'Add to Cart' events.
  2. Define parameters such as quantity, price, and currency.

Checkout Initiation

  1. Track 'Checkout Initiation' with appropriate item details.
  2. Validate all data fields.

Purchase Confirmation

  1. Implement tags for 'Purchase' events.
  2. Ensure all required parameters (e.g., value, currency) are captured.

Testing and Debugging

Using TikTok Pixel Helper

  1. Install the TikTok Pixel Helper Chrome Extension.
  2. Validate the firing of pixel events on your website.

Preview and Debug Mode

  1. Use GTM's Preview and Debug mode to verify the configuration.
  2. Confirm that all events fire on the correct pages.

Final Steps

Publishing the Container

  1. Once all tags and variables are verified, publish the GTM container.
  2. Monitor your TikTok Ad Manager for event tracking.

Verifying Event Firing

  1. Validate in TikTok Events Manager that events are coming through correctly.
  2. Utilize additional debugging tools if necessary.

Conclusion

This guide covers everything from setting up a TikTok Pixel in GTM to configuring advanced event tracking through TikTok's Event API. Following these steps will ensure you're capturing valuable eCommerce events to optimize your TikTok ad campaigns effectively.


Keywords

  • TikTok Pixel
  • Event API
  • Google Tag Manager (GTM)
  • eCommerce Events
  • Custom JavaScript
  • Variable Configuration
  • TikTok Ad Manager
  • TikTok Pixel Helper

FAQ

Q: What do I need before setting up the TikTok Pixel and Event API?

A: You need an active TikTok Business Manager account, a Google Tag Manager (GTM) account, and an eCommerce-enabled website.

Q: How can I validate that my TikTok Pixel is working correctly?

A: Use the TikTok Pixel Helper Chrome Extension to verify pixel events on your website.

Q: Can I customize the events tracked by the TikTok Pixel?

A: Yes, you can customize both standard and custom events, such as View Content, Add to Cart, Checkout Initiation, and Purchase.

Q: What are the key parameters to define for eCommerce events?

A: Key parameters include item ID, item name, price, currency, quantity, and category.

Q: How do I debug my Google Tag Manager setup?

A: Use GTM's Preview and Debug mode to ensure all tags and variables fire correctly on the designated pages.