
Tiktok Ads Integration
- 96 installs
- 41 repo stars
- Updated March 13, 2026
- finsilabs/awesome-ecommerce-skills
Launches TikTok ad campaigns for an ecommerce store, pairing the browser Pixel with the server-side Events API for reliable conversion tracking.
About
Sets up TikTok paid acquisition for ecommerce with Pixel plus Events API server-side tracking, Spark Ads, catalog sync, and shopping ads. A developer uses it when adding TikTok as a paid channel or fixing under-reported Pixel conversions.
- Pairs browser Pixel with server-side Events API (EAPI) for attribution
- Covers Shopify, WooCommerce, BigCommerce official integrations plus custom/headless
Tiktok Ads Integration by the numbers
- 96 all-time installs (skills.sh)
- Ranked #450 of 853 Sales & Marketing skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill tiktok-ads-integrationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 96 |
|---|---|
| repo stars | ★ 41 |
| Last updated | March 13, 2026 |
| Repository | finsilabs/awesome-ecommerce-skills ↗ |
What it does
Launches TikTok ad campaigns for an ecommerce store, pairing the browser Pixel with the server-side Events API for reliable conversion tracking.
Files
TikTok Ads Integration
Overview
TikTok is a primary discovery channel for ecommerce, particularly for fashion, beauty, home, and consumer goods. Reliable attribution requires pairing the browser-based TikTok Pixel with the server-side Events API (EAPI) — similar to Meta's CAPI approach. For Shopify, WooCommerce, and BigCommerce, the official TikTok integrations install both Pixel and EAPI automatically. Custom implementation only belongs in the Custom/Headless section.
When to Use This Skill
- When launching TikTok as a new paid acquisition channel
- When TikTok Pixel is under-reporting conversions and you need Events API
- When setting up Product Shopping Ads or Video Shopping Ads
- When boosting organic creator content as Spark Ads
- When syncing your product catalog for Dynamic Showcase Ads
Core Instructions
Step 1: Connect your platform to TikTok
| Platform | Integration Method | Pixel + EAPI | Catalog Sync |
|---|---|---|---|
| Shopify | TikTok for Shopify (official app) | Yes (built-in) | Yes (automatic) |
| WooCommerce | TikTok for WooCommerce plugin | Yes (built-in) | Yes (automatic) |
| BigCommerce | TikTok channel in Channel Manager | Yes (built-in) | Yes (automatic) |
| Custom / Headless | TikTok Pixel JS + Events API REST | Manual implementation | Manual feed generation |
Step 2: Set up TikTok Ads
---
Shopify
1. Go to Shopify Admin → Sales Channels → + → TikTok 2. Install TikTok for Shopify and connect your TikTok Business account and Ad account 3. Under Pixel & Events, select Maximum Data Sharing — this enables server-side Events API alongside the browser Pixel 4. Shopify automatically:
- Installs the TikTok Pixel on all pages
- Fires ViewContent, AddToCart, InitiateCheckout, and CompletePayment events
- Sends the same events via EAPI from Shopify's servers
- Syncs your product catalog to TikTok Catalog Manager for Shopping Ads
5. Go to TikTok Ads Manager → Assets → Events and check your Pixel's event quality score — aim for 7+/10 6. Check catalog sync status in TikTok Business Center → Catalogs
---
WooCommerce
1. Install TikTok for WooCommerce from the WordPress plugin directory (official TikTok plugin) 2. Go to WooCommerce → TikTok → Connect and sign in with your TikTok Business account 3. Enable Enhanced Matching (EAPI) under the data sharing settings 4. The plugin syncs your WooCommerce product catalog to TikTok Catalog Manager automatically 5. Verify events in TikTok Events Manager → Data Sources → [Your Pixel]
---
BigCommerce
1. Go to BigCommerce Admin → Channel Manager → Add a Channel → TikTok 2. Connect your TikTok Business account and Ad account 3. Enable server-side event tracking during setup 4. BigCommerce syncs your product catalog to TikTok automatically 5. Check product sync status in Channel Manager → TikTok → Products
---
Custom / Headless
For headless stores, install both the browser Pixel and server-side Events API:
Browser Pixel (add to `<head>` on every page):
ttq.load('YOUR_PIXEL_ID');
ttq.page();
// Product page
ttq.track('ViewContent', {
content_id: product.sku,
content_type: 'product',
content_name: product.name,
value: product.price,
currency: 'USD',
});
// Purchase — pass event_id for deduplication with Events API
const purchaseEventId = `purchase-${order.id}`;
ttq.track('CompletePayment', {
content_id: order.lineItems.map(i => i.sku).join(','),
value: order.subtotal,
currency: order.currencyCode,
order_id: order.id,
}, { event_id: purchaseEventId });Server-side Events API (send from your order webhook):
async function trackTikTokPurchase(order: Order, req: Request) {
const eventId = `purchase-${order.id}`; // MUST match Pixel event_id for deduplication
const { createHash } = await import('crypto');
const sha256 = (val: string) => createHash('sha256').update(val.toLowerCase().trim()).digest('hex');
await fetch(
`https://business-api.tiktok.com/open_api/v1.3/pixel/track/?business_id=${process.env.TIKTOK_BUSINESS_ID}`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Token': process.env.TIKTOK_ACCESS_TOKEN!,
},
body: JSON.stringify({
data: [{
pixel_code: process.env.TIKTOK_PIXEL_ID,
event: 'CompletePayment',
event_id: eventId,
event_time: Math.floor(Date.now() / 1000),
user: {
email: sha256(order.customerEmail),
phone_number: sha256(order.customerPhone?.replace(/\D/g, '') ?? ''),
ip: req.ip,
user_agent: req.headers['user-agent'],
ttclid: req.cookies['ttclid'], // TikTok click ID — strongest attribution signal
},
properties: {
value: order.subtotal,
currency: order.currencyCode,
contents: order.lineItems.map(i => ({ content_id: i.sku, content_type: 'product' })),
order_id: order.id,
},
page: { url: `${process.env.STORE_URL}/checkout/thank-you` },
}],
}),
}
);
}Step 3: Build your TikTok campaign structure
In TikTok Ads Manager, build a three-tier campaign structure:
Campaign 1: Prospecting — Video Shopping Ads
- Objective: Product Sales
- Ad Group audience: Broad (target country, age 18–45, no interest targeting)
- Bidding: Lowest Cost (let the algorithm learn for the first 2 weeks)
- Ads: Video Shopping Ads — TikTok auto-generates product videos from your catalog, or upload your own UGC-style vertical videos
- Budget: 60% of total TikTok budget
Campaign 2: Retargeting — Engaged Users
- Objective: Conversions
- Ad Group 1: Viewed product in last 7 days but did not add to cart
- Custom Audience: Website Event → ViewContent, last 7 days
- Ad Group 2: Added to cart but did not purchase (last 3 days)
- Custom Audience: AddToCart, last 3 days; exclude CompletePayment
- Ads: Dynamic product ads showing the specific product the viewer engaged with
- Budget: 30% of total TikTok budget
Campaign 3: Spark Ads — Boost Organic Content
- Objective: Conversions
- Use Spark Ads to boost your top-performing organic TikTok posts or authorized creator posts
- Spark Ads outperform most polished brand content because the social proof (likes, comments) carries over
- Budget: 10% of total TikTok budget
Step 4: Set up Spark Ads (boosting organic content)
1. In TikTok Ads Manager, go to Assets → Creative → Spark Ads 2. To boost your own organic posts: search for the post URL and request authorization 3. To boost creator posts: the creator must grant Spark Ad authorization via TikTok's authorization process — they go to Creator Tools → TikTok for Business and generate an authorization code 4. Authorization codes are valid for 30 days — plan renewal into your workflow
Step 5: Measure TikTok Ads performance
| Metric | Target | Where to Find |
|---|---|---|
| Pixel Event Quality Score | 7+/10 | TikTok Events Manager → Pixel |
| Video play rate (2s) | > 25% | Ads Manager → Campaign Analytics |
| Click-through rate | > 1% | Ads Manager |
| Cost per Purchase | Your target CPA | Ads Manager → Conversions |
| ROAS | > 2× for broad / > 4× for retargeting | Ads Manager → Revenue |
Best Practices
- Use Maximum Data Sharing in Shopify/WooCommerce TikTok integration settings — this enables EAPI and is the most important single setting for attribution quality
- Pass `ttclid` in all EAPI events — capture the TikTok click ID from landing page URLs (
?ttclid=xxx) and store in a cookie; it is the strongest attribution signal after iOS 14 - Use 9:16 vertical video exclusively — horizontal or square ads significantly underperform in TikTok's full-screen feed
- Refresh creatives every 3–4 weeks — TikTok audiences fatigue faster than Meta; plan a continuous creative pipeline
- Start with Lowest Cost bidding — before you have enough conversion data for Cost Cap bidding, Lowest Cost generates the purchase history the algorithm needs
- Exclude recent purchasers (30 days) from prospecting — upload a customer list as a custom audience exclusion in all prospecting ad sets
Common Pitfalls
| Problem | Solution |
|---|---|
| Double-counting purchases in Events Manager | Ensure event_id in Pixel and Events API match exactly for the same event |
| Catalog feed rejections | Check that price format is "XX.XX USD" (space between amount and currency code is required) |
| Low match rate in Events Manager | Send ttclid, ip, and user_agent in addition to hashed email for maximum attribution |
| High CPMs but low click-through rate | First 2 seconds of video must be visually arresting — no logo cards or slow product reveal intros |
| Spark Ad authorization expired | Request new auth codes every 30 days; set calendar reminders for creator-authorized content |
Related Skills
- @meta-ads-integration
- @tiktok-shop-integration
- @google-ads-ecommerce
- @ugc-campaign-management
- @marketing-attribution-dashboard
{
"context": "Tests whether the agent produces a TikTok ecommerce campaign strategy that follows the recommended campaign structure (three campaign types with correct objectives), bidding approach, creative specifications, audience exclusions, Spark Ads setup, and iOS attribution configuration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Product Sales objective",
"max_score": 6,
"description": "Video Shopping Ads campaign uses 'Product Sales' as the campaign objective (not Traffic, Conversions, or Awareness)"
},
{
"name": "Conversions objective for Spark",
"max_score": 6,
"description": "Spark Ads campaign uses 'Conversions' as the campaign objective"
},
{
"name": "LIVE Shopping campaign",
"max_score": 6,
"description": "Strategy includes a LIVE Shopping Ads campaign (third campaign type) for live commerce events"
},
{
"name": "Lowest Cost bidding for prospecting",
"max_score": 8,
"description": "Prospecting ad groups start with Lowest Cost bidding (not Cost Cap) due to insufficient conversion history"
},
{
"name": "30-day purchaser exclusion",
"max_score": 8,
"description": "Prospecting campaigns exclude a custom audience of purchasers from the last 30 days"
},
{
"name": "9:16 vertical video",
"max_score": 8,
"description": "Creative specifications require 9:16 vertical video format (not horizontal or square)"
},
{
"name": "Creative refresh cadence",
"max_score": 8,
"description": "Strategy recommends refreshing creatives every 2-4 weeks to combat audience fatigue"
},
{
"name": "Hook-first creative requirement",
"max_score": 8,
"description": "Creative guidelines state that the first 2 seconds must be visually arresting and explicitly advise against logo cards or slow intros"
},
{
"name": "Spark Ad 30-day auth",
"max_score": 8,
"description": "Spark Ads setup notes that the authorization code expires after 30 days and requires renewal"
},
{
"name": "Spark Ads UGC rationale",
"max_score": 6,
"description": "Strategy recommends Spark Ads specifically for amplifying user-generated or authentic creator content"
},
{
"name": "Catalog-driven video ads",
"max_score": 6,
"description": "Strategy mentions testing auto-generated catalog-driven video ads (TikTok Dynamic Product Ads from catalog)"
},
{
"name": "iOS SKAdNetwork click window",
"max_score": 8,
"description": "iOS attribution section specifies a 7-day click-through window for SKAdNetwork"
},
{
"name": "iOS SKAdNetwork view window",
"max_score": 8,
"description": "iOS attribution section specifies a 1-day view-through window for SKAdNetwork"
},
{
"name": "Retargeting uses video viewers",
"max_score": 6,
"description": "Spark Ads / retargeting campaign targets video viewers (30-day) and/or website visitors"
}
]
}
TikTok Advertising Strategy for Beauty Ecommerce Brand
Problem Description
A direct-to-consumer beauty brand (skincare and makeup) is preparing to launch TikTok as a paid acquisition channel for the first time. They have a strong organic presence — several of their products have gone viral through creator reviews — and a product catalog of around 80 SKUs. Their customer base is primarily iOS users aged 18-34. They have no prior TikTok Ads Manager history, so they're starting from zero conversion data.
The Head of Growth has asked for a comprehensive launch strategy that covers campaign architecture, audience approach, creative guidelines for the production team, and iOS attribution setup. They also want to understand how to leverage the creator content that's already performing well organically. The strategy will be shared both with the internal paid media team and the external creative agency.
Output Specification
Produce a single file named tiktok-launch-strategy.md that contains:
1. Campaign Architecture — a complete plan for structuring their TikTok Ads campaigns, including recommended campaign types, ad group targeting approaches, and which audiences to include or exclude.
2. Bidding and Budget Guidance — recommendations on bid strategies to use at launch vs. once the account matures.
3. Creative Guidelines — specifications and best practices for the creative team producing video ads, including format requirements, pacing, and a recommended refresh cadence.
4. Creator Content Strategy — how to leverage their existing organic creator content in paid campaigns, including any operational considerations for maintaining authorization.
5. iOS Attribution Setup — how to configure attribution windows for their primarily iOS audience.
The document should be practical and actionable enough for a media buyer to implement directly from it.
{
"context": "Tests whether the agent generates a TikTok Catalog Manager-compatible product feed with the correct file format (JSONL), the required fields, proper price formatting, and correct handling of description length and HTML stripping.",
"type": "weighted_checklist",
"checklist": [
{
"name": "JSONL format",
"max_score": 12,
"description": "Output feed file uses JSON Lines format (one JSON object per line, NOT a JSON array)"
},
{
"name": "Price format",
"max_score": 12,
"description": "The price field is formatted as 'XX.XX USD' with a space between the numeric amount and currency code (e.g. '29.99 USD', not '29.99USD' or '$29.99')"
},
{
"name": "sku_id field",
"max_score": 8,
"description": "Each feed item includes a 'sku_id' field (not 'id', 'product_id', or 'variant_id')"
},
{
"name": "availability values",
"max_score": 8,
"description": "The availability field uses exactly 'in stock' or 'out of stock' (not 'available', 'true/false', or similar)"
},
{
"name": "condition field",
"max_score": 6,
"description": "Each feed item includes a 'condition' field set to 'new'"
},
{
"name": "HTML stripped from description",
"max_score": 8,
"description": "HTML tags are removed from the product description before including it in the feed"
},
{
"name": "Description max 1000 chars",
"max_score": 8,
"description": "Description is truncated to a maximum of 1000 characters"
},
{
"name": "image_link field",
"max_score": 6,
"description": "Each feed item includes an 'image_link' field (not 'image', 'image_url', or 'photo')"
},
{
"name": "google_product_category field",
"max_score": 6,
"description": "Each feed item includes a 'google_product_category' field"
},
{
"name": "24-hour sync setup",
"max_score": 8,
"description": "Documentation or instructions mention setting up auto-sync every 24 hours in TikTok Business Center"
},
{
"name": "Business Center registration",
"max_score": 8,
"description": "Documentation references registering the feed URL in TikTok Business Center under Catalogs"
},
{
"name": "Per-variant rows",
"max_score": 10,
"description": "Products with multiple variants generate one row per variant (not one row per product)"
}
]
}
TikTok Product Catalog Feed for Dynamic Shopping Ads
Problem Description
A home goods ecommerce company sells 200+ products across multiple categories (furniture, lighting, decor) and wants to run TikTok Dynamic Product Ads that automatically show the most relevant items to each user. To enable this, TikTok needs an up-to-date product catalog that it can pull from on a regular schedule.
The product catalog currently lives in a database, but the marketing platform team needs to expose it in a format that TikTok's Catalog Manager can ingest. They also need instructions for how to complete the setup in the TikTok Business Center. Products have HTML-formatted descriptions from a rich text editor, and the catalog must support multi-variant products (e.g., a sofa available in three colors and two sizes).
Output Specification
Produce a Node.js/TypeScript script named generate-catalog-feed.ts (or .js) that:
1. Takes the sample product data provided below and generates a TikTok-compatible product catalog feed. 2. Writes the feed to a file named tiktok-catalog.feed.
Also produce a SETUP.md file that explains how to register the generated feed with TikTok and keep it up to date automatically.
Input Files
The following sample product data is provided. Extract it before beginning.
=============== FILE: inputs/products.json =============== [ { "id": "prod-001", "name": "Oslo Oak Dining Table", "slug": "oslo-oak-dining-table", "description": "<p>A <strong>solid oak</strong> dining table with minimalist Scandinavian design. Seats 6 comfortably. <em>Assembly required.</em></p><ul><li>Dimensions: 180x90x75cm</li><li>Material: Solid oak</li></ul>", "brandName": "NordicHome", "gpcCategory": "436", "images": [ { "url": "https://cdn.example.com/products/oslo-oak-dining-table/main.jpg" } ], "variants": [ { "sku": "OSLO-OAK-NAT", "title": "Natural", "price": 849.00, "stockQuantity": 12, "images": [] }, { "sku": "OSLO-OAK-WHT", "title": "White Washed", "price": 899.00, "stockQuantity": 0, "images": [] } ] }, { "id": "prod-002", "name": "Arc Floor Lamp", "slug": "arc-floor-lamp", "description": "<p>Elegant arc floor lamp with a <strong>marble base</strong> and adjustable head. Perfect for reading corners and living rooms.</p>", "brandName": "LuminaHome", "gpcCategory": "594", "images": [ { "url": "https://cdn.example.com/products/arc-floor-lamp/main.jpg" } ], "variants": [ { "sku": "ARC-LAMP-BLK", "title": "Matte Black", "price": 249.00, "stockQuantity": 25, "images": [{ "url": "https://cdn.example.com/products/arc-floor-lamp/black.jpg" }] }, { "sku": "ARC-LAMP-GLD", "title": "Brushed Gold", "price": 279.00, "stockQuantity": 8, "images": [{ "url": "https://cdn.example.com/products/arc-floor-lamp/gold.jpg" }] } ] }, { "id": "prod-003", "name": "Woven Seagrass Basket", "slug": "woven-seagrass-basket", "description": "<p>Hand-woven seagrass storage basket. Ideal for blankets, toys, or plants. Each piece is <em>slightly unique</em> due to the natural material.</p>", "brandName": "NordicHome", "gpcCategory": "696", "images": [ { "url": "https://cdn.example.com/products/woven-seagrass-basket/main.jpg" } ], "variants": [ { "sku": "SEAGRASS-SM", "title": "Small (30cm)", "price": 34.99, "stockQuantity": 50, "images": [] }, { "sku": "SEAGRASS-MD", "title": "Medium (45cm)", "price": 49.99, "stockQuantity": 30, "images": [] }, { "sku": "SEAGRASS-LG", "title": "Large (60cm)", "price": 69.99, "stockQuantity": 0, "images": [] } ] } ]
The store URL base is: https://shop.nordichome-example.com
{
"context": "Tests whether the agent correctly implements TikTok server-side Events API alongside browser Pixel tracking, with proper PII hashing, deduplication via matching event_id, and correct user signal fields (ttclid, ip, user_agent) for maximum match rate.",
"type": "weighted_checklist",
"checklist": [
{
"name": "SHA-256 email hash",
"max_score": 10,
"description": "Hashes the email field using SHA-256 before sending to Events API (not plaintext)"
},
{
"name": "SHA-256 phone hash",
"max_score": 8,
"description": "Hashes the phone number field using SHA-256 before sending to Events API (not plaintext)"
},
{
"name": "SHA-256 external_id hash",
"max_score": 8,
"description": "Hashes the external/customer ID using SHA-256 before sending to Events API"
},
{
"name": "Lowercase + trim before hashing",
"max_score": 8,
"description": "Applies .toLowerCase().trim() to values before SHA-256 hashing (not raw string hash)"
},
{
"name": "Matching event_id",
"max_score": 12,
"description": "The event_id used in the server-side Events API call matches the event_id fired with the browser Pixel for the same event"
},
{
"name": "CompletePayment event name",
"max_score": 8,
"description": "Uses 'CompletePayment' as the event name (not 'Purchase' or another variant)"
},
{
"name": "ttclid included",
"max_score": 8,
"description": "Includes ttclid (TikTok click ID) in the user object sent to the Events API"
},
{
"name": "ip and user_agent included",
"max_score": 8,
"description": "Includes both ip address and user_agent in the Events API user object"
},
{
"name": "Access-Token header",
"max_score": 8,
"description": "Sends the Events API request with an 'Access-Token' header (not Authorization Bearer)"
},
{
"name": "data array payload",
"max_score": 8,
"description": "Wraps the event payload inside a 'data' array when sending to the Events API endpoint"
},
{
"name": "Both Pixel and EAPI",
"max_score": 8,
"description": "Implementation fires BOTH the browser-side Pixel event AND the server-side Events API for the same purchase conversion"
},
{
"name": "Token expiry handling",
"max_score": 6,
"description": "Code or documentation acknowledges that access tokens expire and includes error handling for token expiry (e.g. catches 40100 error code or implements refresh logic)"
}
]
}
Purchase Conversion Tracking for TikTok Ads
Problem Description
A fashion ecommerce startup has been running TikTok ads for three months and their marketing team is frustrated: the TikTok Ads Manager is reporting only about 40% of the purchases that Shopify shows in the same period. Their current setup uses only the TikTok Pixel installed in the browser. The problem is well-understood in the industry — browser-side tracking is increasingly blocked by iOS privacy restrictions, ad blockers, and cookie consent rejections.
The engineering team has been tasked with adding server-side conversion tracking so that purchase events reach TikTok reliably regardless of browser-side signal loss. The backend is a Node.js/TypeScript application. Critically, because both the browser Pixel and the new server-side integration will fire on the same purchase, the team needs to ensure TikTok doesn't double-count conversions.
Importantly, to ensure regulatory compliance, all personally identifiable information must be handled appropriately before it is transmitted to any third-party advertising platform.
Output Specification
Produce a TypeScript module file named tiktok-tracking.ts that implements server-side purchase event tracking. The module should export:
1. A function that sends a purchase conversion event to TikTok's server-side API given order details and request context (IP address, user agent, cookies). 2. A sample call-site snippet (in comments or a separate example-usage.ts file) showing how this function would be invoked from an order webhook handler, including how the browser Pixel would fire alongside it.
Additionally, produce a short NOTES.md file documenting:
- How to obtain and manage the access credentials needed
- Any known failure modes and how the implementation handles them
{
"name": "finsi/tiktok-ads-integration",
"version": "0.1.0",
"summary": "Launch TikTok ad campaigns for ecommerce with Events API server-side tracking, Spark Ads, catalog sync, and shopping ads for product discovery",
"skills": {
"tiktok-ads-integration": {
"path": "SKILL.md"
}
}
}