Published on

TikTok Pixel Purchase E-commerce Event on Shopify using with Google Tag Manager

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:

  1. Copy the head tracking script from your GTM container.
  2. Navigate to your Shopify store's backend by clicking on "Themes" under "Online Store" and select "Edit code."
  3. Paste the head tracking script below the opening head tag.
  4. Copy the body tracking script from your GTM container.
  5. Find the opening body tag in your Shopify theme file and paste the body tracking script below it.
  6. 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

  1. Head over to the TikTok Ads Manager and select Events under Tools.
  2. Choose Web Events since you are using Shopify as your web platform.
  3. If you already have a pixel, select it. Otherwise, create a new one.
  4. Skip the recommended steps by the pixel setup and choose Manual Setup.
  5. Copy the provided pixel code from the TikTok Ads Manager.
  6. Go back to your Google Tag Manager container and create a new tag.
  7. Choose All Pages as the trigger.
  8. Create a custom HTML tag and paste the TikTok pixel code.
  9. Save the tag and create a variable to store the TikTok pixel ID.
  10. Go back to the tag and edit it to include the TikTok pixel ID variable.
  11. 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:

  1. Copy the order status script code from the blog post linked in the video description.
  2. Go to your Shopify store's Settings and then Checkouts.
  3. Paste the code below the Google Tag Manager container script.
  4. 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

  1. Head back to your Google Tag Manager container.
  2. Create a new tag that will fire on the custom purchase event trigger.
  3. Create a custom variable for the event name, which is custom_event_purchase.
  4. Add a custom event trigger using the event name from the previous step.
  5. Select the TikTok pixel tag you created in Section 2.
  6. 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.
  7. 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

  1. Preview your Google Tag Manager container to ensure everything is working correctly.
  2. Add a product to the cart on your Shopify store and proceed to the checkout.
  3. Complete the purchase using test details and a bogus payment card.
  4. Verify that the custom purchase event has fired by checking the debug window and the TikTok pixel helper.
  5. Once you've confirmed everything is working correctly, publish your Google Tag Manager container to make the changes live on your website.

Summary

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

FAQ: Frequently Asked Questions about TikTok Pixel Purchase Event on Shopify using Google Tag Manager.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.