TikTok Ads Cloud Mode Integration

Send events to TikTok Ads using RudderStack cloud mode.

RudderStack lets you send your event data to TikTok Ads via cloud mode.

Note that:

  • This integration supports both Events 1.0 and Events 2.0 API for sending events to TikTok. RudderStack recommends using the Events 2.0 API to send your events as TikTok will sunset the Events 1.0 API by the second half of 2024.
  • To send custom events to TikTok Ads using RudderStack Open Source, use rudder-transformer v1.52.0 or later.

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

Track

Use the track call to capture user events along with the associated properties.

A sample track call is shown below:

javascript
rudderanalytics.track("Order Completed", {
  checkout_id: "12345",
  order_id: "1234",
  affiliation: "Apple Store",
  total: 20,
  revenue: 15.0,
  shipping: 22,
  tax: 1,
  discount: 1.5,
  coupon: "ImagePro",
  currency: "USD",
  contentType: "product",
  products: [{
      product_id: "123",
      sku: "G-32",
      name: "Monopoly",
      price: 14,
      quantity: 1,
      category: "Games",
      url: "https://www.website.com/product/path",
      image_url: "https://www.website.com/product/path.jpg",
    },
    {
      product_id: "345",
      sku: "F-32",
      name: "UNO",
      price: 3.45,
      quantity: 2,
      category: "Games",
    },
  ],
})

Event mapping

This destination does not strictly adhere to the RudderStack Ecommerce Event Spec.

You can use the Event mapping settings in the dashboard to map your events to the below TikTok standard events:

List of supported TikTok standard events

  • Add Payment Info
  • Add to Cart
  • Add to Wishlist
  • Application Approval
  • Click Button
  • Complete Payment
  • Complete Registration
  • Contact
  • Customize Product
  • Download
  • Find Location
  • Initiate Checkout
  • Lead
  • Place an Order
  • Purchase
  • Schedule
  • Search
  • Submit Application
  • Submit Form
  • Subscribe
  • Start Trial
  • View Content

TikTok has recently updated the following standard events:

  • Submit Form is renamed to Lead.
  • Complete Payment is renamed to Purchase.

Although TikTok still supports the old events (Submit Form and Complete Payment), RudderStack recommends using the new events (Lead and Purchase) to avoid any issues.

Note that RudderStack automatically maps the following standard ecommerce events to the corresponding TikTok standard events:

RudderStack eventTikTok Ads event
Product Added to WishlistAdd to Wishlist
Product AddedAdd to Cart
Checkout StartedInitiate Checkout
Payment Info EnteredAdd Payment Info
Checkout Step CompletedComplete Payment
Order CompletedPlace an Order

Property mapping

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

RudderStack propertyTikTok Ads property
timestamp
Required
event_time
properties.eventId
properties.event_id
messageId
event_id
properties.limited_data_uselimited_data_use
properties.contentsproperties.contents
properties.contentType
properties.content_type
properties.content_type
properties.queryproperties.search_string
properties.shopId
properties.shop_id
properties.shop_id
properties.orderId
properties.order_id
properties.order_id
properties.currencyproperties.currency
properties.valueproperties.value
properties.descriptionproperties.description
properties.queryproperties.query
properties.ttcliduser.ttclid
properties.ttp
properties.context.user.ttp
user.ttp
properties.context.user.email
context.user.email
traits.email
context.traits.email
properties.email
user.email
properties.context.user.phone
traits.phone
context.traits.phone
properties.phone
user.phone
properties.city
context.traits.city
context.traits.address.city
user.city
properties.country
context.traits.country
context.traits.address.country
user.country
properties.state
context.traits.address.state
context.traits.state
user.state
properties.att_statususer.att_status
properties.appId
properties.app_id
app.app_id
properties.appName
properties.app_name
app.app_name
properties.appVersion
properties.app_version
app.app_version
properties.callBackad.callback
properties.campaignId
properties.campaign_id
ad.campaign_id
properties.adId
properties.ad_id
ad.ad_id
properties.creativeId
properties.creative_id
ad.creative_id
properties.isRetargeting
properties.is_retargeting
ad.is_retargeting
properties.attributedad.attributed
properties.attributionType
properties.attribution_type
ad.attribution_type
properties.attributionProvider
properties.attribution_provider
ad.attribution_provider
properties.leadId
properties.lead_id
lead.lead_id
properties.leadEventSource
properties.lead_event_source
lead.lead_event_source
properties.context.page.url
properties.url
context.page.url
page.url
properties.context.page.referrer
properties.referrer
context.page.referrer
page.referrer
context.localeuser.locale
context.user.email
traits.email
context.traits.email
user.email
context.traits.phone
traits.phone
user.phone
context.ip
request_ip
user.ip
context.userAgentuser.user_agent
context.traits.city
context.traits.address.city
user.city
context.traits.country
context.traits.address.country
user.country
context.traits.address.state
context.traits.state
user.state
context.device.advertisingIduser.idfa
context.device.iduser.idfv
context.device.advertisingIduser.gaid
context.app.namespaceapp.app_id
context.app.nameapp.app_name
context.app.versionapp.app_version
firstNameuser.first_name
lastNameuser.last_name
zipcodeuser.zip_code

Note that the properties.ttclid to user.ttclid mapping corresponds to the properties.clickId to context.ad.callback mapping in Events 1.0 API.

For TikTok event matching, context.userAgent must contain the original end-user browser user agent string.

Do not pass a server, proxy, CDN, or other infrastructure user agent, for example, Amazon CloudFront, because these values are not useful for event matching.

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 to the TikTok documentation.


Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.