TikTok Ads Device Mode Integration
Send events to TikTok Ads using RudderStack web device mode.
RudderStack lets you send your event data to TikTok Ads via device mode using the native web SDK.
Find the open source JavaScript SDK code for this destination in the GitHub repository.
Identify
You can use the identify
call to identify a user in TikTok ads.
The following snippet highlights a sample identify
call sent to TikTok Ads:
rudderanalytics.identify(
"1hKOmRA4GRlm", {
email: "alex@example.com",
name: "Alex Keener"
}, {
externalld: [{
id: "external_id_1",
type: "tiktokExternalId"
}]
}
);
In TikTok Ads, an external ID is an identifier that uniquely represents a user. Use the externalId
parameter to match the id
with the TikTok user. Make sure to set the type as tiktokExternalId
.
Setting an external ID for a user is helpful in increasing match rates across channels and boost your ad measurements and optimization. For more information on using external IDs, see TikTok documentation.
Traits mappings
RudderStack maps the following traits to the TikTok Ads fields:
RudderStack trait | TikTok Ads trait |
---|
properties.phone
properties.number | phone |
properties.email | email |
externalId.tiktokExternalId | tiktokExternalId |
Track
You can use the track
call to capture user events along with the associated properties.
A sample track
call is shown below:
rudderAnalytics.track("Add To Cart", {
eventId: "123",
category: "cat1",
product_id: "product",
contents: [{
"price": 8,
"quantity": 2,
"content_type": "socks",
"content_id": "1077218"
},
{
"price": 30,
"quantity": 1,
"content_type": "dressing",
"content_id": "1237218"
}
],
currency: "USD",
email: "alex@example.com",
phone: "1234567890"
});
Supported mappings
RudderStack maps the following event properties to the corresponding TikTok Ads properties:
RudderStack property | TikTok Ads property |
---|
context.traits.email
traits.email
properties.email | email |
context.traits.phone
traits.phone
properties.phone | phone |
testEventCode | test_event_code |
properties.event_id | event_id |
properties.contents | contents |
properties.category | category |
properties.status | status |
properties.name | content_name |
properties.product_id
properties.productId | content_id |
properties.contentType
properties.content_type | content_type |
properties.currency | currency |
properties.value | value |
properties.description | description |
Send the testEventCode
property to test a connection in TikTok Ads.
For custom events, RudderStack maps only the standard fields supported by TikTok Ads and drops all other fields in the event. See TikTok Ads standard fields documentation for more information.
Page
RudderStack does not send any page-related properties to TikTok. Once you make a page
call, TikTok automatically fetches all the page-related properties.
The following snippet highlights a sample page
call:
Questions? Contact us by email or on
Slack