Sync Shopper Activities and Monitor Web Events
You can send shopper activities to TikTok, track conversions, and build custom audiences for optimized product discovery. Two options are available. Complete the TikTok for Business integration and sync your product catalog before you begin.
Option 1
Events API Based tracking queues the events by storing them inside custom objects. Events
call the TikTok batch API to push or send them to TikTik. The ViewContent event is
the only real-time API call to TikTok.
- To make sure you have the latest code changes for
int_tiktok
cartridge, pull the latest code version from GitHub. - Upload the code to your sandbox or instance. If you havenβt completed the TikTok for Business integration and synced your product catalog, complete those processes before you continue.
- Import the metadata for the server-side event tracking. The files are in the data-pixel folder.
- Add the
int_tiktok_pixel
cartridge to your cartridge path. The cartridge tracks the following events:View Content
(Product Show)AddToCart
(add item to carat)InitiateCheckout
(begin checkout)CompletePayment
(place order)
- Enable or disable events tracked by the tiktok-settings custom object.
- In Business Manager, select Merchant Tools > Custom Objects > Custom Objects Editor.
- From the Object Type dropdown, select SocialChannels.
- From the object list, select the tiktok-settings object.
- Click Edit Selected. The tiktok-settings reflect how the TikTok for Business app links to TikTok. The Tracking section lists the toggles that you can enable or disable.
- (Optional) Set the View Content event tracking. The default setting is None
and the event isnβt queued. Setting the option to either Real Time or Queue
Events, isnβt recommended for high traffic sites or during a flash sale. If
you set the Queue Event option, run or schedule the TikTok-WebEvents-Push
job more frequently. The job pushes the events to TikTok and clears the
custom objects. Note: When you deselect the Enable Events API Based Tracking all events are disabled.
- When the setup is complete, use the Test Event Function to verify your event setup.
Option 2
Embed the TikTok pixel into your site to send shopper activities into TikTok. For
detailed steps, see TikTok documentation.
int_tiktok
exposes a hookapp.template.htmlHead
. You can use the hook to inject the TikTok pixel directly into an SFRA storefront that manually installs the pixel to a site. To enable the pixel, add the following code snippet inhtmlhead.isml
.<isprint value="${dw.system.HookMgr.callHook('app.template.htmlHead', 'htmlHead', pdict) || ''}" encoding="off">