TikTok Conversions API integration
- The TikTok API integration allows you to pass conversion details from CPV Lab Pro to TikTok and see them directly in your TikTok Ads Manager account.
- This is very important for the optimization and delivery of your ads through TikTok because it allows TikTok to see how your ads performed for specific audiences.
Pre-requirements
- CPV Lab Pro Version 9.0 or newer
- A TikTok Ads Manager account
- At least one active campaign on TikTok
Campaign Setup in CPV Lab Pro for TikTok
Setting up a campaign for TikTok can be done in the same way as for any other traffic source. Here are the steps required.
1. Import the TikTok Traffic Source (if you don’t have it already in your tracker)
- Access the Traffic Sources page and import TikTok from the Catalog of networks
2. Choose TikTok as the traffic source for your campaign.
- You will get the available tokens pre-filled. The important token here is External ID Token because this will contain a unique code for each visitor.
- Choose as extra tokens the metrics that you want to see in reports from the ones available in the dropdowns.
3. Choose the Data Options that you want to capture in your campaign.
- It is very important to select the User Agents Data Options as this is needed in order to pass conversions back to TikTok.
- Also make sure that you have the IP address capturing checked.
4. Define the landing pages and offers for your campaign.
Define the landing pages and offers for your campaign
- you can use from the predefined landing pages or offers OR
- you can add new ones directly in the campaign
Add the Step 2 code provided in the campaign setup page and add it in your landing pages, just before the closing
</body>
tag.
5. Take the provided Campaign URL (base.php page) and use it as the URL of the ads defined in TikTok.
- Notice that the Campaign URL contains the
__CLICKID__
macro which will be replaced by TikTok with a unique code for each visitor
TIP
Note: TikTok accepts both Campaign URL tracking and Direct Traffic Code tracking, so you can use any of the 2 tracking methods. This guide uses the Campaign URL tracking method.
Campaign setup in TikTok
- Create your campaign, ad groups and ads in TikTok using the TikTok Ads Manager interface.
- When creating an ad in TikTok, use the Campaign URL as the Destination URL, like this:
- The Campaign URL will contain all the tokens accepted by TikTok that you have configured to be captured in Extra Tokens.
Setup the TikTok API integration to pass conversions
1. Create a TikTok Pixel (if not already created)
- Access the Tik Tok Ad Manager interface here:https://ads.tiktok.com/i18n/dashboard/ (opens new window)
- Go to the Assets -> Events menu, then Choose “Manage” for Web Events
- Select “Set Up Web Events”, then choose “Events API” to create a new pixel
- Enter a name for the Pixel, then choose “Manually Set Up Events API”.
- Choose Next from the bottom of the page and your pixel is setup.
2. Get the Pixel ID
- Check the Pixel details page for the Pixel ID. This appears after the “ID:” text.
- Save this Pixel ID as it will be needed later.
3. Generate the Access Token
- Also in the Pixel details page, look for the Settings tab, then select the “Generate Access Token” button.
- Save the Access Token value somewhere safe as this won’t be displayed again and it isn’t stored by TikTok.
4. Go back to the campaign setup page in CPV Lab Pro to finish the TikTok API configuration
Go to your TikTok Campaign in CPV Lab Pro
Look for the new TikTok specific section in the "Tracking Pixel" area of the campaign setup page. Here is where you need to add the TikTok API details:
- API Access Token – the access token generated above
- Pixel ID – the ID of your TikTok Pixel created above
- Event Name – the name of the event you want to pass to TikTok for each conversion. The default name is CompletePayment
- Amount – the revenue that you want to pass to TikTok.
- The default value of the
{!revenue!}
placeholder which will be replaced by the actual revenue. - You can also set a fixed numeric value:
- The default value of the
- Currency – the currency for your revenue (3-letter ISO code). The default option is USD.
Save the campaign setup page and the integration with TikTok API for this campaign is complete.
Check that conversions get reported
- Once the above things are implemented, CPV Lab Pro will automatically send conversion details to TikTok each time the Postback URL gets fired from the Affiliate Network in your campaign.
- After receiving a few new conversions in your campaign, you should make sure that these were posted to TikTok by looking in 3 places:
- In the Conversions Log page from CPV Lab Pro - you will see a record starting with
"type":"tiktokapi
and with the details posted to TikTok for each TikTok API call and with“message”:”OK”
in the ClickID column, something like in the image below
- In the Conversions Log page from CPV Lab Pro - you will see a record starting with
- In TikTok, in the Overview tab from the Pixel details page - you should see the number of CompletePayment events received and also the last time an event was received,like in the image below
- In the reports from your TikTok Ads Manager account - You will see conversions appearing here also; For complete details in these reports, choose the Custom Columns option and select the Page Event columns as shown below
Final Notes
- The TikTok campaigns are setup in CPV Lab Pro similar to campaigns from other traffic sources with only these changes:
- The Traffic Source for your campaign should be “TikTok” (imported from the Catalog) and the External ID token should be configured for the
“__CLICKID__”
macro - The TikTok API configuration (Pixel ID and Access Token) needs to be performed in order to pass conversion details back to TikTok
- Make sure that you have checked the options to capture the User Agents and IP Addresses from your visitors
- The Traffic Source for your campaign should be “TikTok” (imported from the Catalog) and the External ID token should be configured for the
WARNING
There may be a small delay (up to 15 minutes) between the moment conversions are passed from CPV Lab Pro to the TikTok API and the moment that they appear in the Pixel details page from TikTok Ads Manager. This is normal and doesn’t affect tracking.
Find more details in the video below:
Video Tutorial for setting up your TikTok campaign in CPV Lab (opens new window)