TikTok integration
This guide applies only when selling pre-orders through Purple Dot's own checkout. Pre-orders sold through the Shopify checkout benefit from the same tracking as your regular sales.
If you have enabled TikTok tracking on the Integration settings page in the Merchant Portal, the Purple Dot checkout automatically sends certain events to TikTok via the Events API.
What you need before you start
The TikTok app installed on the Shopify store and connected to the merchant’s TikTok Ads account
A TikTok Pixel active on the storefront via that app, with browser events flowing in TikTok Events Manager
Admin access to the merchant’s TikTok Ads Manager / Events Manager
Step 1 - Install the TikTok app on Shopify
In Shopify Admin, go to Settings → Apps and sales channels (or open the TikTok app on the Shopify App Store).
Install TikTok (by TikTok Inc.).
Open the app and sign in with the TikTok account that has access to the merchant’s TikTok Ads Manager.
Connect the Shopify store to the correct TikTok Ads account.
When prompted, set up or connect a TikTok Pixel. The app supports one-click pixel integration — use the same pixel you plan to use for Events API and Purple Dot.
Complete the app setup and confirm the pixel is connected and active on the storefront.
Use the same pixel everywhere. The Pixel ID you enter in Purple Dot must match the pixel connected in the TikTok Shopify app and shown in TikTok Events Manager. If these don’t match, connection tests may pass but production events will go to the wrong pixel—or checkout events won’t attribute correctly.
Verify the pixel is working on the storefront
In Shopify Admin, go to Settings → Customer events
Verify the app is “Connected”
On the TikTok app, click “Test”

Accept any cookie consent banner that covers marketing/analytics cookies
Confirm events are being processed

After the connection is saved, Purple Dot will send real server events automatically when a TikTok connection exists for the store. No extra configuration is required in Purple Dot beyond saving the connection
Add to cart
AddToCart
Initiate checkout
InitiateCheckout
Add payment info
AddPaymentInfo
Pre-order created
Purchase
Step 2 - Generate an access token, get the Pixel ID, and open Test Events
Generate an access token
In Events Manager, on the same pixel, go to Settings → Events API.
Generate a new access token
Copy the token immediately and store it securely.

This token is what Purple Dot calls Access Token.
Find the Pixel ID
Stay on the pixel in Events Manager.
Open Settings (or the pixel overview).
Copy the Pixel ID (alphanumeric string).

Use this value in Purple Dot’s Pixel ID field.
Open Test Events (for verification)
In Events Manager, select the pixel.
Open the Test Events tab (or Test event section).
Copy the Test event code shown there. You’ll use this when testing from Purple Dot or on the storefront so events appear in this tab instead of production reporting.
Keep this tab open while you run any of the verification options in Step 3.

Step 3 - Add credentials in Purple Dot
Log in to the Purple Dot merchant portal.
Go to Settings → Integrations.
Under Analytics, click Connect for TikTok.
In the TikTok connection modal, enter:
Field
Value
Access Token
Token from Step 2
Pixel ID
Pixel ID from Step 2
Test Event Code (optional)
Test event code from the Test Events tab
Click Save.

Step 4 - Verify the connection
There are two ways to verify the integration. Use Option A for a quick credential check, Option B to test the full checkout flow end-to-end.
Option A - Test Connection in the modal (recommended for first setup)
In the TikTok connection modal, fill in Access Token, Pixel ID, and Test Event Code.
Click Test Connection (bottom-left of the modal).
Wait for “Credentials verified!”
Purple Dot sends a dedicated test event:
Event name:
PurpleDotTestEventExternal ID:
purple-dot-connection-test(hashed)
If a Test Event Code was provided, TikTok routes the event to the Test Events tab.

Option B - Test via live checkout with tiktok_test_event_code (end-to-end)
tiktok_test_event_code (end-to-end)This option verifies the full integration: storefront → Purple Dot checkout → TikTok Events API → Events Manager Test Events. It is the best way to confirm real checkout events (AddToCart, InitiateCheckout, AddPaymentInfo, Purchase) are flowing correctly.
Copy the Test event code from TikTok Events Manager → [your pixel] → Test Events.
Open the storefront with the test event code in the URL:
https://your-store.com/products/example-product?tiktok_test_event_code=YOUR_TEST_CODE
Replace
YOUR_TEST_CODEwith your actual test event code. The parameter can be added to any storefront page URL.Accept cookie consent so the
_ttpcookie is set.Complete a test preorder/checkout flow (add to cart, open checkout, enter payment details, complete the order).
In TikTok Events Manager → Test Events, confirm the real checkout events appear — for example
AddToCart,InitiateCheckout,AddPaymentInfo, andPurchase.

How it works
Purple Dot reads
tiktok_test_event_codefrom the storefront URL.The code is stored for the browser session (until the tab is closed), so it persists as the shopper navigates and opens embedded checkout.
For that session, all TikTok server events sent by Purple Dot include the test event code and appear in the Test Events tab rather than production reporting.
Tip: To stop sending test events, close the browser tab (or open a new session without the query parameter). The test event code is not persisted beyond the browser session.
Last updated