TikTok Pixel Purchase E-commerce Event on Shopify using Google Tag Manager
In this article, we will guide you through the process of setting up the TikTok pixel purchase event on your Shopify store using Google Tag Manager. This event is crucial for optimizing your TikTok ads and tracking customers who are more likely to make purchases on your website. By configuring Google Tag Manager and properly tracking the necessary data, such as email, phone number, and e-commerce event data, you can ensure that the purchase event is accurately captured.
Section 1: Configuring Google Tag Manager on Shopify Pages
To ensure that your Google Tag Manager container is firing on your Shopify store, you need to add the head and body tracking scripts from your GTM container to your Shopify theme. Follow these steps:
- Copy the head tracking script from your GTM container.
- Navigate to your Shopify store's backend by clicking on "Themes" under "Online Store" and select "Edit code."
- Paste the head tracking script below the opening
- Copy the body tracking script from your GTM container.
- Find the opening
bodytag in your Shopify theme file and paste the body tracking script below it.
- Save the changes.
This will ensure that your GTM container is properly firing on all pages of your website, except the final thank you pages.
To make sure your GTM container is firing on the thank you pages, go to
Settings and then
Checkouts in your Shopify store. Scroll down to the
Order Status Scripts section and paste the head snippet for your GTM container under
Additional Scripts. Save the changes.
Section 2: Configuring the TikTok Pixel on Google Tag Manager
- Head over to the TikTok Ads Manager and select
Web Eventssince you are using Shopify as your web platform.
- If you already have a pixel, select it. Otherwise, create a new one.
- Skip the recommended steps by the pixel setup and choose
- Copy the provided pixel code from the TikTok Ads Manager.
- Go back to your Google Tag Manager container and create a new tag.
All Pagesas the trigger.
- Create a custom HTML tag and paste the TikTok pixel code.
- Save the tag and create a variable to store the TikTok pixel ID.
- Go back to the tag and edit it to include the TikTok pixel ID variable.
- Save the changes.
By following these steps, you'll ensure that your TikTok pixel is firing on all pages of your website.
Section 3: Configuring the Purchase Event
To track the purchase event on your Shopify store, you need to add a tracking code to the final thank you page. Follow these steps:
- Copy the order status script code from the blog post linked in the video description.
- Go to your Shopify store's
- Paste the code below the Google Tag Manager container script.
- Save the changes.
This code will ensure that the purchase event is tracked correctly on the final thank you page.
Section 4: Creating Tags, Triggers, and Variables
- Head back to your Google Tag Manager container.
- Create a new tag that will fire on the custom purchase event trigger.
- Create a custom variable for the event name, which is
- Add a custom event trigger using the event name from the previous step.
- Select the TikTok pixel tag you created in Section 2.
- Define the necessary variables for the tag, such as the TikTok pixel ID and data layer variables for user data, email, phone number, and currency.
- Save the changes.
By completing these steps, you'll have a tag configured to push the purchase event data to your TikTok pixel.
Section 5: Testing and Publishing
- Preview your Google Tag Manager container to ensure everything is working correctly.
- Add a product to the cart on your Shopify store and proceed to the checkout.
- Complete the purchase using test details and a bogus payment card.
- Verify that the custom purchase event has fired by checking the debug window and the TikTok pixel helper.
- Once you've confirmed everything is working correctly, publish your Google Tag Manager container to make the changes live on your website.
Keywords: TikTok, Pixel, Purchase Event, E-commerce, Shopify, Google Tag Manager.
In this article, we have provided a step-by-step guide on setting up the TikTok pixel purchase event on a Shopify store using Google Tag Manager. By following this process, you can optimize your TikTok ads and track customers who are more likely to make purchases on your website. By configuring Google Tag Manager, adding the necessary scripts, and creating tags, triggers, and variables, you can ensure accurate tracking of the purchase event data.
FAQ: Frequently Asked Questions about TikTok Pixel Purchase Event on Shopify using Google Tag Manager.
How can I verify if my Google Tag Manager container is firing on my Shopify store?
- You can use the preview feature in Google Tag Manager, or you can check the Google Tag Manager Legacy Chrome extension for verification.
What is the purpose of the TikTok pixel purchase event?
- The purchase event allows you to track and optimize your TikTok ads to target customers who are more likely to make purchases on your website.
Can I track other e-commerce events using the same process?
- Yes, you can configure other e-commerce events such as view content, add to cart, and initiate checkout by creating additional tags, triggers, and variables in Google Tag Manager.
How can I test if the purchase event is working correctly?
- You can add a test product to your cart, proceed to the checkout, and complete the purchase using test details. Verify the event firing in the debug window and the TikTok pixel helper.
What should I do after verifying that the purchase event is working correctly?
- Once you've confirmed everything is working as expected, you can publish your Google Tag Manager container to make the changes live on your website.
These FAQs address common questions users may have about the TikTok pixel purchase event setup process on Shopify using Google Tag Manager. If you have any additional questions, please feel free to ask.