Tonic Integration Guide

Written by Support. Updated over a week ago

After you have finished connecting one or more of the supported traffic source accounts in the first step of the Account Wizard process, you can continue connecting your Tonic Publisher account in order to have both traffic source and Tonic revenue data aggregated in one place.

Follow the steps below to connect your Tonic Publisher account to TheOptimizer Native.


Step 1: When on the Account Wizard page, select a traffic source account and then click Next.
Step 2: In the second step of the Account Wizard, click on Add New to start connecting your Tonic account.
Step 3: On the pop-up integration screen, click on the Select Tracking Platform drop-down list and select Tonic.
Step 4: Fill in the required information as noted in the screenshot below then click Save and Next to move to the next step.

Required input information details:

Nickname: Add a friendly, easy to recognize name for your Tonic Publisher account.
API Key: API Key value as provided in your Tonic Publisher account (detailed below).
API Secret: API Key value as provided in your Tonic Publisher account (detailed below).

Step 5: specify which Tonic subids you are using to pass traffic source macros back to Tonic.
One possible configuration is shown in the screenshot below:

Step 6: Campaign tracking code:
According to the configuration in the previous step, TheOptimizer assumes that you are also using the same setup on the traffic source campaigns’ tracking code (in this case Taboola but it applies to all traffic sources).

The tracking code you need to make sure it is present in your campaigns in this case is:

subid1={campaign_id}&subid2={site}&subid3={campaign_item_id}


IMPORTANT!Make sure all the traffic source macros are used in your configuration. In case one of the required traffic source macros is missing in your Tonic mapping configuration, or in your campaign tracking code, the data from Tonic for that macro will be missing in TheOptimizer. For example if you are not using {site} macro, there will not be Tonic data for Taboola sites in TheOptimizer


Custom Tracking – When to use it?

If for some reason you do not have all the Tonic subids available (because you are already using some of them for other purposes), but you have only a couple of them, you can enable and use our custom tracking option.

Using the Custom Tracking option, you are able to pass more than one traffic source macro on a single Tonic subid, using a special format.
For example, in case of Taboola, you can pass all Taboola macros on sub1, like shown in the screenshot below:

In this case the tracking code that you need to add in your campaigns needs to be exactly in the same format:

subid1={campaign_id}|{site}|{campaign_item_id}

Here are some examples of top used traffic source custom tracking concatenated templates:


Concatenated Taboola Tracking String: {campaign_id}|{site}|{campaign_item_id}
Concatenated RevContent Tracking String: {boost_id}|{content_id}|{adv_targets}|{widget_id}
Concatenated Outbrain* Tracking String: {{campaign_id}}|{{publisher_id}}|{{section_id}}|{{ad_id}}

Outbrain special case

Because Outbrain macro values (ID values) have an average length of 35 characters. So Putting all required tokens on a single concatenated string like in the example above, may result in trimmed values on Tonic’s side. This is due to the Tonic limit of max 100 characters that can be passed on a single subid.

So to overcome this limitation, for Outbrain we recommend using a combination of Custom Tracking and normal tracking.
For example, one possible configuration can be as in the screenshot below, where campaign id and publisher id are being concatenated and passed under sub3 while section id is being passed on sub2 and ad id on sub1:

In this case the tracking code that needs to be added to Outbrain campaigns is:

subid1={{ad_id}}&subid2={{section_id}}&subid3={{campaign_id}}|{{publisher_id}}

Where do I find Tonic API Information?

Please follow the steps below to find Tonic API information.

Login to your Tonic Publisher account then go to Account > Settings

Copy the values visible on the API Access section of your account settings, then paste it on the API Username to API Key and API Password to API Secret field in TheOptimizer integration screen.

Updated on April 28, 2023
Was this article helpful?

Related Articles