Send data to TikTok Ads Manager

TikTok is the world’s leading destination for short-form mobile videos. TikTok’s mission is to capture and present the world’s creativity, knowledge, and moments that matter in everyday life.

Your brand can send custom audiences and offline events to TikTok Ads Manager:

Custom audiences

Custom audiences

Custom audiences help find people who already know about or have engaged with your brand. Use custom audiences for re-marketing, finding potential repeat customers, and finding lookalike audiences.

Custom audiences

Offline events

Offline events help your brand track offline conversions from your marketing campaigns. Support for offline events and parameters is part of the TikTok Events API.

Tip

Offline events must have occurred within the previous 28 days. The maximum attribution windows for

  • Click-through attribution (CTA) is 28 days

  • View-through attribution (VTA) is 7 days

Offline events beyond these attribution windows are not matched to ads or displayed in reporting.

This topic describes the steps that are required to send custom audiences and offline events to TikTok Ads Manager:

  1. Get details

  2. Configure OAuth

  3. Custom audiences

  4. Offline events

Get details

TikTok Ads Manager requires the following configuration details:

Detail one.

The advertiser ID for your TikTok Ads Manager account.

The advertiser ID is a nineteen character string similar to “7654321098765432109”. It is available from the drop-down menu in the top right of TikTok Ads Manager.

Detail two.

TikTok Ads custom audiences only

The name of the custom audience to be managed by Amperity.

If a custom audience already exists, the list of customers in that audience will be updated to match the list sent from Amperity. If a custom audience does not exist, Amperity will add it. Amperity does not delete custom audiences.

Important

A custom audience name may contain up to 400 visible characters, after which the name will be truncated to blank characters followed by “…”.

Detail one.

TikTok Ads custom audiences only

The user ID type.

This value must be one of the following: AAID (Google), EMAIL (email addresses), IDFA (Apple), or PHONE (phone numbers). Amperity is configured to send EMAIL and PHONE by default for campaigns.

Tip

The EMAIL (email addresses) user ID type most often leads to the best match rates.

Detail two.

TikTok Ads offline events only

The event set ID. (The event set must exist before you can send data to it from Amperity.)

An event set ID is a nineteen character string similar to “7654321098765432109”.

You can create an event set ID from the TikTok Ads user interface.

If the event set ID already exists, from the TikTok Ads user interface open Assets, then Events, and then from the Offline box select Manage. Each event set will have its own card; the event set ID is located under the name of the event set.

Detail two.

Authorize Amperity to send data to the customer’s TikTok Ads Manager account for offline events.

Note

Destinations for TikTok Ads Manager audience segments and offline profiles both use the same OAuth process, but may require different credentials and must be configured individually.

Configure OAuth

OAuth is an open standard for access delegation, commonly used to grant websites or applications access to information on other websites.

Use OAuth to configure Amperity to send email addresses, phone numbers, and advertising IDs (IDFAs for iOS devices or AAIDs for Android devices) to TikTok Ads Manager.

Important

TikTok Advertiser Accounts are required to use OAuth. Confirm that the account that will be used to authorize to TikTok Ads Manager has the TikTok Ad Account Operator or TikTok Ad Account Admin permission level. OAuth will not work if your account has TikTok Ad Account Analyst permission.

To configure OAuth

Step 1.

Open the Destinations tab and click Add Destination. The Add Destination dialog box opens.

Select TikTok Ads Manager from the Plugin drop-down, and then from the Credential drop-down, select Create a new credential.

This opens the Create New Credential dialog box.

Step 2.

In the Create New Credential dialog box, click “Generate authorization URL”.

Copy the URL, and then provide the URL to a user who has credentials that allow access to TikTok Ads Manager. The user must log in and complete the steps required by the OAuth process for TikTok Ads Manager.

After this is completed, you will be redirected to the Credentials page in Amperity.

Verify the credential is on the page, and then return to the Destinations tab.

Step 3.

Open the Destinations tab and click Add Destination. The Add Destination dialog box opens.

Select TikTok Ads Manager from the Plugin drop-down, and then from the Credential drop-down, select the credential that is authorized to access TikTok Ads Manager.

Note

The value for the Refresh Token setting is updated automatically after you select the credential.

Reauthorize Amperity

You may need to reauthorize access to TikTok Ads Manager. This is necessary when an authorization token has expired or when it has been removed by someone with permission to manage access within TikTok Ads Manager. To reauthorize access to TikTok Ads Manager, follow the steps to configure OAuth and create a new credential.

Custom audiences

Custom audiences help find people who already know about or have engaged with your brand. Use custom audiences for re-marketing, finding potential repeat customers, and finding lookalike audiences.

A custom audience must have at least 1000 members in TikTok Ads Manager before it can be used in an ad group.

Caution

To refresh audiences from Amperity, new one-time segment deliveries need to be created and uploaded to the client’s TikTok account.

Note

Amperity uses a combination of endpoints in the TikTok Ads Manager Segment API to verify existing segments , add or update the list of customers to match the list of customers sent from Amperity, and then map multiple advertising account IDs to the same business account .

Changes to audience mapping are not immediately available in TikTok Ads Manager. Allow for up to 48 hours after the point at which Amperity has finished sending audience updates for them to be available.

Add destination

Configure Amperity to send email addresses, phone numbers, and advertising IDs (IDFAs for iOS devices or AAIDs for Android devices) directly to TikTok Ads Manager.

Warning

Amperity must be authorized to send data to your TikTok Ads Manager account prior to configuring the destination.

To add a destination

Step 1.

Open the Destinations tab to configure a destination for TikTok Ads Manager. Click the Add Destination button to open the Destination dialog box.

Name, description, choose plugin.

Enter the name of the destination and a description. For example: “TikTok Ads Manager custom audiences” and “Send offline events to TikTok Ads Manager.”.

Step 2.

Credentials allow Amperity to connect to TikTok Ads Manager.

The credential type is set automatically. You may use an existing credential or you may add a new one.

Choose an existing credential or add credential.

Select an existing credential from the Credential drop-down.

– or –

Select Create a new credential from the Credential drop-down. This opens the Credential dialog box.

Enter the name for the credential, and then add a description.

Steps to configure OAuth

  1. Generate an authorization link, and then visit the URL that was generated to complete the authorization process.

  2. Log in to TikTok Ads Manager at the generated URL using credentials that allow access to your instance of TikTok Ads Manager.

    Note

    Send the URL to an individual who can provide these credentials, and then ask them to log into TikTok Ads Manager on your behalf.

  3. When complete, you will be redirected to the Credentials page in Amperity.

  4. Verify the credential is on the page, and then return to the Destinations tab. From the Plugin drop-down, select the TikTok Ads Manager, and then use the credential that was just created.

Step 3.

Each destination has settings that define how Amperity will deliver data to TikTok Ads Manager. These settings are listed under the Settings section of the Destination dialog box.

Settings for TikTok Ads custom audiences.

The advertiser ID is a nineteen character string similar to “7654321098765432109”. It is available from the drop-down menu in the top right of TikTok Ads Manager.

If a custom audience already exists, the list of customers in that audience will be updated to match the list sent from Amperity. If a custom audience does not exist, Amperity will add it. Amperity does not delete custom audiences.

The user ID type must be one of the following: AAID (Google), EMAIL (email addresses), IDFA (Apple), or PHONE (phone numbers). Amperity is configured to send EMAIL and PHONE by default for campaigns.

Note

When the advertiser ID, custom audience, and the user ID type settings were are not configured as part of the destination, you must configure them as part of the data template before making this destination available to campaigns.

Step 4.

Business users are assigned to the Amp360 User and/or AmpIQ User policies. (Amp360 User allows access to queries and orchestrations and AmpIQ User allows access to segments and campaigns.) A business user cannot select a destination that is not visible to them.

Business users – including users assigned to the DataGrid Operator policy – may have restricted access to PII.

What is restricted access to PII?

Restricted PII access is enabled when the Restrict PII access policy option that prevents users who are assigned to that option from viewing data that is marked as PII anywhere in Amperity and from sending that data to any downstream workflow.

You can make this destination visible to orchestrations and allow users with restricted access to PII to use this destination by enabling one (or both) of the following options:

Allow business users access to this destination.
Step 5.

Review all settings, and then click Save.

Save the destination.

Important

You must configure a data template for this destination before you can send data to TikTok Ads Manager.

Add data template

A data template defines how columns in Amperity data structures are sent to downstream workflows. A data template is part of the configuration for sending query and segment results from Amperity to an external location.

Caution

To refresh audiences from Amperity, new one-time segment deliveries need to be created and uploaded to the client’s TikTok account.

About paid media campaigns

Amperity provides the right set of data to support your brand’s paid media advertising with TikTok Ads Manager.

  1. Merged Customers vs. Unified Paid Media

    The Merged Customers table contains each of your customers’ best profiles.

    The Unified Paid Media table contains all your customer’s known profile data.

    Your brand will require additional data templates to use the Unified Paid Media table alongside the Merged Customers table to support paid media campaigns.

  2. Enable dedicated data templates for each table.

    Use a consistent naming pattern to label data templates that use data from the Merged Customers table. For example: “Best profile”.

    Use a consistent naming pattern to label data templates that use data from the Unified Paid Media table. For example: “Full profile”.

  3. After data templates are configured for both tables, use the default attributes component on the Campaigns page to configure which attributes will be associated with the destination, including the table from which those attributes will be pulled.

    The selected table will affect your brand’s downstream match rates and overall customer matches within your paid media campaigns. The decision behind which table to use depends on your brand’s downstream use case and the type and amount of customer profile data your brand wants to use to match customers.

    You brand should expect to see higher match rates when sending audiences from the Merged Customers table, but a higher number of matched customer profiles when sending audiences from the Unified Paid Media table. Use A/B testing to compare the results from each table, after which your brand can use the audience that works best for your campaigns.

To add a data template

Step 1.

From the Destinations tab, open the menu for a destination that is configured for TikTok Ads Manager, and then select Add data template.

This opens the Add Data Template dialog box.

Step 1

Enter the name of the data template and a description. For example: “TikTok Ads Manager custom audiences” and “Send custom audiences to TikTok Ads Manager.”.

Step 2.

Verify business user access to queries and orchestrations and access to segments and campaigns.

A business user may also have restricted access to PII, which prevents them from viewing and sending customer profile data.

Step 2.

If business user access was not configured as part of the destination, you may configure access from the data template.

Important

To allow business users to use this destination with campaigns, you must enable the Available to campaigns option. This allows users to send campaign results from Amperity to TikTok Ads Manager.

If you enable this option, the data extension settings require using campaign name and group name template variables to associate the name of the data extension to your campaign.

Step 3.

Verify all configuration settings.

Verify settings for the data template.

Important

The EMAIL user ID type leads to the best match rates!

Note

When the advertiser ID, custom audience, and the user ID type settings were are not configured as part of the destination, you must configure them as part of the data template before making this destination available to campaigns.

Step 4.

Review all settings, and then click Save.

Save the data template.

After you have saved the data template, and depending on how you configured it, business users can send query results and/or send campaigns to TikTok Ads to TikTok Ads Manager.

Offline events

Send offline events to TikTok Ads Manager to help your brand track offline conversions that result from your marketing campaigns. Support for offline events and parameters is part of the TikTok Events API.

For example: When did a customer purchase? What did a customer purchase? Was it from a store or a website? How many items were purchased? Was there more than one purchase? What was the total revenue for each purchase?

Note

Offline events are not immediately available in TikTok Ads Manager. Allow for up to 24 hours after the point at which Amperity has finished sending offline events for them to be available.

Build a query

Use a query to build a combination of data from the your brand’s customer 360 database to represent the set of offline events that your brand wants to use within TikTok Ads Manager. A query that collects offline events for use in TikTok Ads Manager is similar to:

SELECT
  'ACME Essentials' AS brand
  ,uit.product_category AS content_category
  ,uit.product_id AS content_id
  ,uit.product_name AS content_name
  ,'product' AS content_type
  ,'USD' AS currency
  ,TO_HEX(SHA256(TO_UTF8(LOWER(TRIM(mc.email))))) AS emails
  ,'CompletePayment' AS event
  ,'website' AS event_channel
  ,CAST(uit.order_id AS VARCHAR) AS event_id
  ,'7654321098765432109' AS event_set_id
  ,uit.order_id
  ,CONCAT('+1','',REGEXP_REPLACE(mc.phone,'[$\D\s]','')) AS phone
  ,uit.item_price AS price
  ,uit.item_quantity AS quantity
  ,uit.store_id AS shop_id
  ,uit.order_datetime AS timestamp
  ,CAST(uit.item_revenue / uit.item_quantity AS DOUBLE) AS value
FROM Unified_Itemized_Transactions uit
LEFT JOIN Merged_Customers mc ON uit.amperity_id = mc.amperity_id
WHERE uit.order_datetime > (CURRENT_DATE - interval '7' day)

and MUST contain the following fields: emails, event, event_id, and event_set_id. Review the list of supported offline events parameters while building the query.

Fields that contain PII – emails and phone_numbers, for example – should have one-way SHA-256 hashing applied to them.

Note

Currency must be in ISO 4217. For example: “EUR”, “USD”, or “JPY”.

Note

The phone number must be in e164 format. If your customer 360 database is not already standardized for e164 format, use the following line instead of ,c360.phone AS phone:

,CONCAT('+1','',REGEXP_REPLACE(mc.phone,'[$\D\s]','')) AS phone_numbers

Add destination

Configure Amperity to send email addresses, phone numbers, and advertising IDs (IDFAs for iOS devices or AAIDs for Android devices) directly to TikTok Ads Manager.

Warning

Amperity must be authorized to send data to your TikTok Ads Manager account prior to configuring the destination.

To add a destination

Step 1.

Open the Destinations tab to configure a destination for TikTok Ads Manager. Click the Add Destination button to open the Destination dialog box.

Name, description, choose plugin.

Enter the name of the destination and a description. For example: “TikTok Ads Manager offline events” and “Send offline events to TikTok Ads Manager.”.

Step 2.

Credentials allow Amperity to connect to TikTok Ads Manager.

The credential type is set automatically. You may use an existing credential or you may add a new one.

Choose an existing credential or add credential.

Select an existing credential from the Credential drop-down.

– or –

Select Create a new credential from the Credential drop-down. This opens the Credential dialog box.

TikTok Ads Manager requires using OAuth to authorize Amperity to send offline events to your TikTok Ads Manager account.

Step 3.

Each destination has settings that define how Amperity will deliver data to TikTok Ads Manager. These settings are listed under the Settings section of the Destination dialog box.

Settings for TikTok Ads offline events.

The advertiser ID is a nineteen character string similar to “7654321098765432109”. It is available from the drop-down menu in the top right of TikTok Ads Manager.

The event source may be one of web or offline.

Step 4.

Business users are assigned to the Amp360 User and/or AmpIQ User policies. (Amp360 User allows access to queries and orchestrations and AmpIQ User allows access to segments and campaigns.) A business user cannot select a destination that is not visible to them.

Business users – including users assigned to the DataGrid Operator policy – may have restricted access to PII.

What is restricted access to PII?

Restricted PII access is enabled when the Restrict PII access policy option that prevents users who are assigned to that option from viewing data that is marked as PII anywhere in Amperity and from sending that data to any downstream workflow.

You can make this destination visible to orchestrations and allow users with restricted access to PII to use this destination by enabling one (or both) of the following options:

Allow business users access to this destination.
Step 5.

Review all settings, and then click Save.

Save the destination.

Important

You must configure a data template for this destination before you can send data to TikTok Ads Manager.

Add data template

Offline events must be sent using a query and orchestration. The data template associated with offline events should not be made available to the Campaigns editor.

To add a data template

Step 1.

From the Destinations tab, open the menu for a destination that is configured for TikTok Ads Manager, and then select Add data template.

This opens the Add Data Template dialog box.

Step 1

Enter the name of the data template and a description. For example: “TikTok Ads Manager offline events” and “Send offline events to TikTok Ads Manager.”.

Step 2.

Verify business user access to queries and orchestrations and access to segments and campaigns.

A business user may also have restricted access to PII, which prevents them from viewing and sending customer profile data.

Step 2.

If business user access was not configured as part of the destination, you may configure access from the data template.

Step 3.

Verify all configuration settings.

Add the Event Set ID.

Verify settings for the data template.

An event set ID is a nineteen character string similar to “7654321098765432109”.

You can create an event set ID from the TikTok Ads user interface.

If the event set ID already exists, from the TikTok Ads user interface open Assets, then Events, and then from the Offline box select Manage. Each event set will have its own card; the event set ID is located under the name of the event set.

Note

If the event set ID is not specified in the data template it must be specified at orchestration.

Step 4.

Review all settings, and then click Save.

Save the data template.

After you have saved the data template, and depending on how you configured it, business users can send query results and/or send campaigns to TikTok Ads to TikTok Ads Manager.

Workflow actions

A workflow will occasionally show an error that describes what prevented a workflow from completing successfully. These first appear as alerts in the notifications pane. The alert describes the error, and then links to the Workflows tab.

Open the Workflows page to review a list of workflow actions, choose an action to resolve the workflow error, and then follow the steps that are shown.

Step one.

You may receive a notifications error for a configured TikTok Ads Manager destination. This appears as an alert in the notifications pane on the Destinations tab.

Review a notifications error.

If you receive a notification error, review the details, and then click the View Workflow link to open this notification error in the Workflows page.

Step two.

On the Workflows page, review the individual steps to determine which step(s) have errors that require your attention, and then click Show Resolutions to review the list of workflow actions that were generated for this error.

The workflow tab, showing a workflow with errors.
Step three.

A list of individual workflow actions are shown. Review the list to identify which action you should take.

Choose a workflow action from the list of actions.

Some workflow actions are common across workflows and will often be available, such as retrying a specific task within a workflow or restarting a workflow. These types of actions can often resolve an error.

In certain cases, actions are specific and are shown when certain conditions exist in your tenant. These types of actions typically must be resolved and may require steps that must be done upstream or downstream from your Amperity workflow.

Amperity provides a series of workflow actions that can help resolve specific issues that may arise with TikTok Ads Manager, including:

Step four.

Select a workflow action from the list of actions, and then review the steps for resolving that error.

Choose a workflow action from the list of actions.

After you have completed the steps in the workflow action, click Continue to rerun the workflow.

Advertiser not found

Amperity may only send data to an advertiser account ID that already exists within TikTok Ads Manager. When Amperity cannot find the advertiser account ID within TikTok Ads Manager, this may be due to any of the following:

  1. An Amperity configuration issue related to the destination or the data template that is associated with that destination.

  2. An advertiser account ID that is not associated with an approved advertising account in TikTok Ads Manager.

To resolve this error, determine the cause of the configuration issue.

  1. Open the Amperity Destinations page in a new browser tab.

    Review the configuration for the destination and data template that is associated with this workflow.

  2. Open TikTok Business Center and verify that the advertising account exists, is approved, and has a valid advertiser account ID.

  3. Update the configuration for Amperity to match the correct advertiser account ID.

  4. Return to the workflow action, and then click Resolve to retry this workflow.

Invalid credentials

The credentials that are defined in Amperity are invalid.

To resolve this error, verify that the credentials required by this workflow are valid.

  1. Open the Credentials page.

  2. Review the details for the credentials used with this workflow. Update the credentials for TikTok Ads Manager if required.

  3. Return to the workflow action, and then click Resolve to retry this workflow.

Missing advertiser permissions

The business user that is associated with your TikTok Ads Manager account is the same business user that provides credentials for Amperity to manage audiences in TikTok Ads Manager.

This business user must have permission to manage audiences, which requires that business user to be assigned to one of the following roles:

  • Admin

  • Operator (recommended)

To resolve this error, verify that the business user is assigned to the Operator role.

  1. Open TikTok Business Center .

    Verify the role to which the business user that provides credentials for Amperity is assigned. The business user must be assigned to the Operator role.

  2. Open the Amperity Credentials page in a new tab, and regenerate the authorization link for the business user who is assigned to the Operator role.

  3. Return to the workflow action, and then click Resolve to retry this workflow.

Offline events parameters

The following table describes each of the parameters that are required by TikTok Ads Manager for offline events.

The fields are listed alphabetically, but may be returned by a query in any order.

Field name

Description

agent

Web events only. A non-hashed user agent from the user’s device. This field should be sent along with ip when both are available. (Amperity renames this field to “(user_agent)” when events are sent to TikTok Ads Manager.)

brand

The brand name of the product item.

content_category

A product category.

content_id

A product identifier.

content_name

The name of a product.

content_type

A product or product type.

cookie_id

Web events only. A unique ID that matches website visitor events with ads on TikTok. (Amperity renames this field to “(ttp)” when events are sent to TikTok Ads Manager.)

currency

The ISO 4217 code for the currency that is associated with the offline event. For example: “USD”.

email

Required. The email associated with the order.

The email address that is associated with a customer. A customer may have more than one email address.

event

Required

The type of offline event.

Add event to your query and then set a value:

,event AS 'CompletePayment'

Important

The value for event must be one of the supported offline event types defined by TikTok Ads Manager. A partial list of event types—ones that are more likely to align to your Amperity use cases—is described in the following table.

The value for event must be one of the following:

AddPaymentInfo

Use when the offline event is associated with a customer adding their payment information as part of the checkout process on your brand’s website.

AddToCart

Use when the offline event is associated with a customer adding a product in your product catalog to the cart on your brand’s website.

CompletePayment

Use when the offline event is associated with a completed transaction, either in-store or from your brand’s website.

CompleteRegistration

Use when the offline event is associated with a customer signing up for something, such as joining your brand’s loyalty program or creating an accounnt on your brand’s website.

Contact

Use when the offline event is associated with a customer’s interaction with your brand’s customer support team.

Download

Use when the offline event is associated with a customer downloading something from your brand’s website.

PlaceAnOrder

Use when the offline event is associated with a customer placing an order from your brand’s website.

Subscribe

Use when the offline event is associated with a customer subscribing to something, such as your brand’s loyalty program or notifications (email or SMS).

The value for event is used to categorize offline conversions within the TikTok Ads Manager user interface and may not be customized. Use the event type that best associates how your brand wants to use offline events within TikTok Ads Manager.

event_channel

The event channel type. Must be one of the following values: email, website, phone_call, in_store, crm, or other.

event_id

Required. The unique identifier for the offline event. TikTok Ads Manager recommends that the value for event_id be a string of 32 characters that includes any combination of numeric digits (0-9), uppercase letters (A-Z), and lowercase letters (a-z).

event_set_id

Required. The event set ID. (The event set must exist before you can send data to it from Amperity.)

An event set ID is a nineteen character string similar to “7654321098765432109”.

You can find the event set ID from the TikTok Ads user interface. Click Assets, then Events, and then from the Offline box select Manage. Each event set will have its own card; the event set ID is located under the name of the event set.

event_source

The type of event to be uploaded to TikTok Ads Manager. May be one of “web” or “offline”.

Use “web” for events that took place on your website and were collected using the payload helper . Use “offline” for events that took place in a physical store and are measured by an offline event set ID.

ip

Web events only. A non-hashed public IP address for the user’s device. May be an IPv4 or an IPv6 address, full or compressed. This field should be sent along with agent when both are available.

order_id

The unique ID for a transaction.

phone

Recommended.

The phone number that is associated with a customer. A customer may have more than one phone number.

Note

A phone number must be in E.164 format, which represents a phone number as a number up to fifteen digits in length (without spaces) that starts with a + symbol. For example: +12061234567.

price

The price of a product or service.

quantity

The number of items associated with an offline event.

shop_id

The unique ID for a physical store location or for your brand’s website.

tiktok_click_id

Web events only. A parameter that is appended to a landing page URL whenever a user clicks on an ad in TikTok. (Amperity renames this field to “ttclid” when events are sent to TikTok Ads Manager.)

timestamp

The date and time at which the offline event occurred. The timestamp should use ISO 8601 formatting.

value

The value associated with the offline event.

Note

This value is required for revenue reports within TikTok Ads Manager.