TikTok Ads is TikTok's online advertising platform. It lets marketers run product ads to target custom audiences and optimize their campaigns.

RudderStack supports TikTok Ads as a destination where you can send your event data seamlessly.

Find the open source transformer code for this destination in the GitHub repository.

Getting started

Before configuring TikTok Ads as a destination in RudderStack, verify if the source platform is supported by TikTok Ads by referring to the table below:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported
To know more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the source platform supports sending events to TikTok Ads, follow these steps:

Connection settings

To successfully configure TikTok Ads as a destination, you need to configure the following settings:

TikTok ads connection settings
  • Access Token: You need to generate the Access Token (also known as long-term access token) by following the steps mentioned in Authorization and Authentication topics in TikTok documentation.
  • Pixel Code: You can find the Pixel Code by referring to TikTok documentation.
  • Hash Contextual User Properties (SHA-256): If this setting is enabled, RudderStack will hash the contextual user properties like external_id, email, phone_number from the raw format to the SHA-256 format.
  • Mapping to trigger the TikTok Ads standard events for the respective Events: Enter the event name and select the corresponding TikTok Ads standard event from the dropdown to be triggered when that event is called.
You can specify multiple standard events for one event name and vice versa.

Track

The track call lets you capture user events along with the properties associated with them.

A sample track call is shown below:

rudderanalytics.track(
"Checkout Started", {
eventId: "1616318632825_357",
context: {
ad: {
callback: "123ATXSfe"
}
},
currency: "USD",
value: 46.0
}, {
externalId: [{
type: "tiktokExternalId",
id: "1234"
}]
}
);

Event mapping

RudderStack maps the following events to the corresponding TikTok Ads Events:

RudderStack eventTikTok Ads event
ViewContentViewContent
ClickButtonClickButton
SearchSearch
ContactContact
DownloadDownload
SubmitFormSubmitForm
CompleteRegistrationCompleteRegistration
SubscribeSubscribe

RudderStack also maps the following e-commerce events:

RudderStack eventTikTok Ads event
Product Added to WishlistAddToWishlist
Product AddedAddToCart
Checkout StartedInitiateCheckout
Payment Info EnteredAddPaymentInfo
Checkout Step CompletedCompletePayment
Order CompletedPlaceAnOrder

Property mapping

RudderStack maps the following optional event properties to the corresponding TikTok Ads fields:

RudderStack propertyTikTok Ads property
properties.eventIdevent_id
timestamptimestamp
properties.testEventCodetest_event_code
properties.contentsproperties.contents
properties.currencyproperties.currency
properties.valueproperties.value
properties.descriptionproperties.description
properties.queryproperties.query
properties.context.ad or context.adcontext.ad
properties.context.page or context.pagecontext.page
properties.context.usercontext.user
context.ipcontext.ip
context.userAgentcontext.user_agent
From externalId tiktokExternalIduser.external_id

FAQ

I see a 40002 response code with ‘No permission to operate pixel code’ error message, what can I do?

This error code is related to the authentication of your TikTok account. For more information, refer TikTok documentation.


Contact us

For more information on the topics covered on this page, email us or start a conversation in our Slack community.

Contents