Summary

  1. The base TikTok pixel and conversion events serve different roles in tracking store activity.

  2. The guide covers product views, Add to Cart actions, and completed payments.

  3. Connect event tracking to the relevant customer actions so advertising data reflects more than page visits.

Watch the video demonstration

1. Install the base TikTok pixel in Shopify

Let’s start with the base code. This is the code that goes on every page and lets TikTok track your visitors for you. First, we’ll go grab your TikTok pixel code:

  1. Head over to your TikTok ads dashboard. From the main menu, select Library > Event.
  2. In the Website Pixel card, click Manage. Then click the Create Pixel button.
  3. Name the pixel whatever you like, and select Manually install pixel code. Click Next to proceed.
  4. You’ll arrive on a a page with your TikTok pixel. Click Copy Pixel Code.

Now that we have the code, we’re going to add it to your Shopify theme.

  1. Let’s head over to your Shopify admin. From the main men, select Online Store > Themes.
  2. For your current theme, click Actions and select Edit code.
  3. Under Layout, select theme.liquid.
  4. Ctrl+F and search for </head>.
  5. Paste your TikTok pixel in the line right before </head>.

We also need to add this code to your post-purchase thank you page.

  1. From your Shopify admin, go to Settings > Checkout.
  2. Look for Order processing. There is an Additional scripts text box in this section.
  3. Paste your TikTok pixel in the Additional scripts box.

2. Setup the TikTok Pixel View Product event

The rest of these steps will happen in your TikTok ads dashboard, so let’s head back there.

We left off on the pixel installation step on the Events Manager page, so we’re going to pick back up from there.

  1. Click Next on the pixel installation step to proceed.
  2. On the page that appears, select E-Commerce Events.
  3. Click on the trash bin icon next to Place an Order. We won’t be needing this event since it’s essentially the same thing as Complete Payment.
  4. Click Continue to setup event rules to proceed.
  5. We are now going to setup the Product Details event. Select Destination URL under Choose a tracking method.
  6. Click Add Rule. Enter /products/ in the text box for Rule 1. This will result in the rule Page URL Contains /products/. Then click Save.

3. Setup the TikTok Pixel Add to Cart event

  1. From the same screen as where we setup the View Product event, click on the Add to Cart tab.
  2. Select Click Events as the tracking method.
  3. We’re going to need the TikTok Pixel Helper for Chrome now. So go ahead and install that.
  4. On the left half of the page, enter the URL of your product page in the Website URL box. Then click Update.
  5. Your product page will load in a box on the page. Find your Add to Cart button, and click it. Then click Save.
  6. If you have additional Add to Cart buttons, repeat steps 4 and 5 for each other button.

4. Setup the TikTok Pixel Complete Payment event

  1. From the same screen as where we setup the Add to Cart event, click on the Complete Payment tab.
  2. Select Destination URL under Choose a tracking method.
  3. Click Add Rule. Enter /thank_you in the text box for Rule 1. This will result in the rule Page URL Contains /thank_you. Then click Save.

That’s it! Your tracking for TikTok ads is setup. You’re now good to go for the TikTok pixel in Shopify.

Is your Shopify store
fast enough?

Find out what’s slowing your storefront down and where to start improving it.

Preparing your demo

  1. Checking your store
  2. Opening your homepage, a collection and a product
  3. Extracting the styles your first screen needs
  4. Getting your demo ready

This usually takes 10 to 30 seconds.

FAQ

What does the base TikTok pixel do?

The guide describes the base pixel as the foundation for tracking visits. Additional event rules identify actions such as viewing a product, adding to cart, and completing payment.

Which shopping events does the guide cover?

It covers product views, Add to Cart, and Complete Payment. These represent different stages of the shopping journey.

Is adding the base pixel enough to track purchases?

Not by itself in the setup described. The guide separately configures the Complete Payment event so completed purchases can be distinguished from ordinary visits.

Why does the guide check more than one Add to Cart button?

A store may let shoppers add products from different controls. The guide repeats the event setup for additional buttons so those interactions are not overlooked.

What is the purpose of the TikTok Pixel Helper in this guide?

The guide uses the helper during Add to Cart event configuration. It supports identifying the relevant interaction rather than relying only on a page visit.