TikTok — manual setup
Manual flow for connecting TikTok's Events API. Two values to copy: a 20-character Pixel Code and a long-form access token. Both come from TikTok Ads Manager.
events.js) on your site once the destination is connected. You don't need to add TikTok's base code snippet to your site separately — pb.js handles it. Browser pixel + Events API share an event_id for automatic deduplication.Before you start
- You need a TikTok Ads Manager account with
AdminorOperatorrole on the asset. Standard members can view pixels but can't generate API tokens — check your role at Account Settings → User Management. - Your business needs to be verified in TikTok For Business if it isn't already (small badge under business name). Unverified accounts get rate-limited heavily on the Events API.
- You should have a web pixel created for your domain. If not: Tools → Events → Web Events →
+ Set Up Web Events→ pick "Manual setup" → name + URL.
D7VH38JC77U3LFDOLGRG) is what they label "Pixel Code" in the dashboard but call pixel_id in their Events API documentation. AdsPing accepts either label — paste the 20-char value.Open TikTok Events Manager
Sign in at ads.tiktok.com. Top nav → Tools → Events.
Direct link: ads.tiktok.com/i18n/events_manager/web/list.
Note:Agency or multi-brand setup? TikTok scopes everything to one BC (Business Center) at a time. The active BC is shown in the top-left dropdown — switch BCs there. Trying to manage a pixel from the wrong BC will silently show 0 results in the pixel list.
- ▦Campaign
- ◎Assets
- ⚙Tools
- ▤Reporting
- 👤Account
Events Manager
Tools menu — Events
Acme Inc — Web Pixel
Pixel Code: D7VH38JC77U3LFDOLGRG · acme.com
Old test pixel
Pixel Code: ABCDEFGHIJKLMNOPQRST
TikTok Events Manager — Web Events list
Capture the Web Events tab showing the pixel list. Helps users navigate from Tools menu to the right page.
Open the dataset detail page
Click the row that matches your domain. The detail page has 5 tabs: Overview, Test Events, Event Activity, Diagnose, Settings.
Make sure the pixel status is Active. Inactive pixels won't accept Events API calls — TikTok rejects with 40000: pixel_code is invalid even though the pixel exists.
Acme Inc — Web Pixel
Status: Active · Created 2 weeks ago · acme.com
Last 7 days
1,832
+8% events
Match Score
Medium
Sources
Web · Server
Copy the Pixel Code
20-character alphanumeric, e.g. D7VH38JC77U3LFDOLGRG. Case matters — TikTok rejects events with case-mismatched pixel codes.
The Pixel Code appears in three places:
- In the URL.
ads.tiktok.com/i18n/events_manager/web/list/D7VH38JC77U3LFDOLGRG - In the page subtitle right under the pixel name.
- On the Settings tab → "Pixel ID" field (yes, TikTok labels it "Pixel ID" here even though the list page calls it "Pixel Code").
Pixel settings
Pixel basics — read-only details
Pixel ID
D7VH38JC77U3LFDOLGRG📋 CopyConnected URL: https://acme.com
Pixel name: Acme Inc — Web Pixel
TikTok Events Manager — Pixel Code field on Settings tab
Capture the Settings tab where the Pixel ID/Code is shown with a copy button. Mask the actual code value if you want — just show the location.
Note:The Pixel Code uses uppercase letters by default. If you copy it via a tool that lowercases (some terminal pipes, badly-configured form fields), TikTok rejects every Events API call. Always paste and visually verify the case.
Generate an Events API access token
Same Settings tab → scroll past the basics → "Events API" section.
The Events API section is collapsed by default if you haven't set it up before. Click "Set Up" to expand. You'll see a description, integration partner picker (Shopify/Wix/etc.), and the "Manual" option — pick Manual.
Events API
Server-to-server event forwarding
Send events directly from your server to TikTok, bypassing browser tracking limitations. Recommended alongside the browser pixel.
Connect with a partner
Pre-built integrations for Shopify, WooCommerce, Wix, Magento. AdsPing isn't in this list.
Manually set up
Generate an access token to use with your own server. ← pick this for AdsPing.
A modal opens with the token. It's shown exactly once — copy immediately. If you close the modal without copying, you have to revoke and regenerate (which invalidates any existing setup using that token).
Your access token
Treat this like a password. Anyone with this token can send events to your pixel. Save it somewhere safe — you can't view it again after closing this dialog.
⚠ Save before closing — TikTok won't show this token again.
TikTok Events Manager — token generation dialog
Capture the modal that pops up when 'Generate Access Token' is clicked. Mask the actual token characters; just show the dialog layout, the Copy button, and the warning text.
Paste both into AdsPing
Pixel detail page → TikTok card → Manual setup.
TikTok Events API — Manual setup
Server-side conversion forwarding to TikTok Events API
The 20-character alphanumeric value from step 3
The long-form token from step 4
You'll fill this when verifying — see step 6
On Save, AdsPing calls TikTok's validation endpoint with your credentials. If the token is valid and has access to the pixel, the card flips green. The same Save action also kicks off browser pixel auto-injection for new visitors — pb.js fetches the Pixel Code and loads events.js automatically.
Verify with Test Events
TikTok's Test Events tab is the same shape as Meta's — paste an AdsPing test code, fire an event, watch it appear within seconds.
- TikTok Ads Manager → Tools → Events → your pixel → Test Events tab.
- Copy the test code at the top (format
TEST_ABCDEFGH— 8-12 characters after theTEST_prefix). - AdsPing → pixel detail → Pipelines section → pencil on the TikTok pipeline.
- Paste the code into Test Event Code → Save.
- The pipeline gets an orange "Test mode" badge.
- Trigger an event on your site. Within ~3 seconds it appears in TikTok's Test Events tab. Source column shows
Serverfor AdsPing-sent events; if browser pixel is also active you'll seeBothwith a Deduplicated tag. - When verified, clear the Test Event Code on the AdsPing pipeline and Save. Production events flow into normal attribution from then on.
Test Events
Validate setup before going live
Your test code: TEST_ABCDEFGH
Events sent with this code show up here instead of production reporting. Code regenerates if you don't use it for 14 days.
Just now · event_id=abc-123 · email ✓ phone ✓ ttp ✓
4 seconds ago · event_id=def-456 · email ✓ phone ✓ ttp ✓
Common issues
40000: pixel_code is invalid
- The pixel is inactive on the TikTok side — check Settings tab, status should be Active.
- Pixel code letter case is wrong — TikTok rejects lowercase variants. Re-copy from the dashboard.
- Whitespace in the value — paste, then click in the field and press End: the cursor should land at the last character with no trailing spaces.
40105: Access-Token is invalid
Token was revoked or partially copied. Generate a new one and paste again. TikTok's token strings are usually 60+ characters — partial copies happen when the token field has horizontal scroll (especially on mobile dashboard).
Match Score = Low
- The TTP cookie is missing. TikTok's equivalent of Meta's FBP — it only gets set when
events.jsis loaded on the visitor's session. AdsPing auto-injects events.js, but only after the destination is configured. Make sure the TikTok card is green BEFORE testing match quality. - email/phone aren't reaching the server. Check that your form fields use
name="email"andname="phone"— pb.js uses these standard attributes to harvest values. - ttclid not captured. Equivalent of fbclid for TikTok ads. Only present for visitors who arrive via a TikTok ad click. Direct traffic won't have it — that's expected.
TikTok Event Builder says "pixel not detected"
Event Builder probes your site for window.ttq._i[PIXEL_CODE] within ~10 seconds of page load. If pb.js loads with a delay (e.g. loaded as defer below other heavy scripts), the probe can timeout. Move the AdsPing script tag to the top of <head> and keep it as a regular blocking script (no defer/async needed — pb.js itself is async-internally).
Next
- Test Event Code overview — works the same for Meta + TikTok + GA4.
- Wire up Google Ads — different flow (OAuth-only + multi-action).
- Using TikTok Event Builder — codeless event setup that AdsPing automatically mirrors.