Cherry Seed

How do I install TikTok Pixel?

TikTok Pixel pixel installation WooCommerce tracking event code header scripts conversion tracking

Quick Answer

In TikTok Ads Manager, navigate to Tools then Events, create a Web Pixel, and copy the base code. Paste the base code into your WordPress site's header before the closing head tag — most themes provide a header scripts field in Customizer, or use a plugin like Insert Headers and Footers. Then add event-specific code to conversion pages: ViewContent on product pages, AddToCart on the cart action, and CompletePayment on the order confirmation page. For WooCommerce, dedicated plugins handle event placement automatically. Verify installation using the TikTok Pixel Helper Chrome extension before launching any ad campaigns.

Full Answer

The installation has two layers: base code and event code. The base code loads TikTok's tracking library on every page. Event codes fire specific conversion signals on pages where customer actions occur. Both are required for TikTok Ads to optimize campaigns effectively.

The base code is a JavaScript snippet containing your unique Pixel ID. It must load on every page of your site, which means placing it in the site-wide header. For WordPress, the cleanest approach is your theme's header scripts field (found in Appearance then Customize then Additional Scripts on most themes). If your theme lacks this field, the Insert Headers and Footers plugin provides it. Avoid pasting the code directly into header.php — theme updates will overwrite it.

Event codes track specific customer actions. TikTok's standard ecommerce events include ViewContent for product page views, AddToCart when items are added to the cart, InitiateCheckout when the checkout page loads, and CompletePayment on the order confirmation page. Each event accepts parameters: content_id for the product SKU, content_type set to product, value for the price, and currency.

For WooCommerce stores, manual event placement is unnecessarily complex. Plugins that integrate with WooCommerce hooks handle event placement automatically by firing the correct TikTok event at each stage of the purchase funnel. The plugin approach also handles dynamic product data — passing the correct SKU, price, and quantity for each event without custom JavaScript per product page.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/721

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/tiktok-tracking/tiktok-pixel-issues-install-tiktok-pixel