Published on

UPDATED: How To Install TikTok Pixel Tracking On Your Website (Using GTM)

Introduction

Hey, it's Cedric from Vertex Marketing Agency. In this article, I'm going to show you how to setup the TikTok pixel on your website using Google Tag Manager (GTM). Recently, TikTok released a template for the TikTok pixel which makes the process much easier than before. I’ve updated the implementation steps from my video 10 months ago to reflect this change.

Step 1: Create Google Tag Manager Account

  1. Go to tagmanager.google.com and create a free account.
  2. Once created, install the GTM code to your website as directed.

Step 2: Add TikTok Pixel Template

  1. Inside GTM, navigate to Templates.
  2. Click on Search Gallery and use the search icon to find "TikTok".
  3. Select the TikTok template by TikTok and click Add to Workspace.
  4. Repeat the search process and add the Event ID variable template from “state”.

Step 3: Enable Variables

  1. Navigate to Variables.
  2. Click on New, find and select unique event ID from the list, and save it.

Step 4: Add Base TikTok Pixel Code

  1. Go to Tags.
  2. Create a new tag and select Custom HTML.
  3. In your TikTok Ads Manager, navigate to Tools > Events > Web Events > Settings of your pixel.
  4. Copy the base pixel code and paste it into the HTML field in GTM.
  5. Set the Priority to 100 and create a trigger to fire it on All Pages.
  6. Name the tag (e.g., "TikTok Base Code") and save.

Step 5: Setup Event Tags

  1. Create a new tag and select the TikTok template.
  2. Add your TikTok pixel ID (you can create a constant variable for this).
  3. Select the event you want to track, e.g., view content, add to cart, etc.
  4. Add the unique event ID variable to the event ID field.
  5. Create a trigger specific to the event. For a simple example, create a URL-based trigger for the thank you page visit indicating a form submission.
  6. Add the trigger to the tag and save it.

Step 6: Button Click Tracking

  1. Create an All Clicks trigger for GTM.
  2. Enable the built-in variables for clicks.
  3. Preview this in GTM and open your website.
  4. Click the relevant button (e.g., a submit button) and check the GTM summary tab.
  5. Based on the click variables data, create a trigger for when the specific button is clicked (e.g., by finding the click text or ID).
  6. Create a new TikTok event tag (e.g., add to cart) with the unique event ID and the new click trigger.
  7. Save and publish your tag.

Step 7: Testing and Publishing

  1. Use GTM’s preview mode to ensure tags fire correctly on required actions.
  2. Check events in the TikTok Event Manager under the Test Events section using your phone.
  3. Optionally, use TikTok’s Chrome extension for further validation.

Conclusion

This guide provides step-by-step instruction to properly implement TikTok pixel tracking on your website via GTM. Make sure to subscribe to my channel for future updates including server-side tracking.


Keywords

  • TikTok pixel
  • Google Tag Manager (GTM)
  • Base Code
  • Event Tracking
  • Click Trigger
  • Tag Templates
  • Event ID
  • Pixel ID
  • Form Submission
  • Debugging

FAQ

Q: What is the purpose of the TikTok Pixel? A: The TikTok Pixel allows you to track actions on your website and optimize your TikTok ads.

Q: Why do we need to use Google Tag Manager for the TikTok Pixel? A: GTM simplifies the deployment and management of tracking tags without needing direct code changes on your website.

Q: How do I find my TikTok Pixel ID? A: You can find your TikTok Pixel ID in the TikTok Ads Manager under the specific pixel's settings.

Q: What is the Event ID and why is it important? A: Event ID is used for tracking specific user interactions, which can be crucial for accurate analytics, especially when combining browser and server-side tracking.

Q: How do I test if my Pixel events are firing correctly? A: You can test using Google Tag Manager’s preview mode, TikTok Event Manager’s Test Events feature, and the TikTok Pixel Helper Chrome extension.