We'll be with you in a second

Granular reporting for partners / affiliates

Typeform and RedTrack

Typeform is a web-based platform you can use to create anything from surveys to apps, without needing to write a single line of code. Visit www.typeform.com for more info on this solution.

To integrate Typeform with RedTrack act as follows:

Settings on the Typeform side

⬇️ 1. Add the needed RT parameters to Typeform

 

1.1 Go to your Typeform profile-> click Create typeform:

1.2 Find the tab Create-> Logic-> Personalize with data-> Hidden fields:

1.3 Press Add new field-> give these fields names rtclickid and contact_type-> press Save to apply the changes:

⬇️ 2. Add Webhook to Typeform

2.1 In your Typeform template go to the tab Connect-> Webhooks-> Add a webhook:

2.2 Insert the URL for your Webhook-> press Save webhook:

The URL should be of the following format: https://yourdomain.rdtk.io/postback/custom/typeform/API key. Where:

  • instead of yourdomain.rdtk.io you put RT’s default subdomain which can be found in Tools->Domains->New:
  • your API key can be found in RedTrack-> Tools-> Integrations-> General:

 

Settings on the RedTrack side

⬇️ 3. Create a custom Brand/Offer source in RT

 

3.1 Brands / Offer sources-> New from scratch:

3.2 Give your source a name-> assign the Roles (find the roles needed for Typeform integration with RT in the screenshot below)-> press Save to apply the changes in the template:

  • Click here to learn more about adding Brands to RedTrack.
  • Click here to learn more about adding Offer sources to RedTrack.
⬇️ 4. Add your Website / Offer to RT

 

4.1 Websites / Offers-> New:

4.2 fill in the mandatory fields-> press Save:

  • Click here to learn more about adding Websites to RedTrack.
  • Click here to learn more about adding Offers to RedTrack.
⬇️ 5. Add the needed Traffic channel to RT

 

Check out this article to help you add a Traffic channel in RedTrack.

⬇️ 6. Add a custom tracking domain

 

Check out this article and/or this video guide to help you add a custom tracking domain.

7. Create a Campaign in RedTrack

Scenarios for your tracking Campaigns in RedTrack may be as follows:

Scenario 1: only unattributed (aka organic) traffic. In which case, one Campaign for your unattributed (aka organic) source is enough.

Scenario 2: several paid Traffic sources (like Facebook or Google or something else) and unattributed (aka organic) traffic. In this case it is crucially important to add these Traffic sources first and then create a Campaign for each source. This will help you to have all the important data in place and grouped correctly.

Expand to see how to act depending on the scenario

 

7.1 Find more on Facebook and Google integration if you use any of them. If you work with some other paid traffic channel, you can search for the integration guide here.

7.2 Add the traffic source for unattributed (aka organic) traffic. To do that:

7.2.1 go to Traffic channels-> New from template-> add the template named Other:

7.2.2 add the name “Other” or “Organic” or anything else you’d like in the Channel name field in order to identify the unattributed traffic from other paid traffic channels:

 

7.3 Create campaigns with each of your sources or traffic. For example, if you have Facebook and organic (the one created in step 7.2), you should create 2 campaigns.

⬇️ 8. Set up conversion tracking

 

So far, the only Typeform event that can be added to RedTrack is Lead. To set it up go to Tools->Conversion tracking-> Conversion type-> name the event Lead:

If webhook doesn’t count the incoming conversions as Leads, these conversions will fall under the category of the Default Conversion type=Conversion.

⬇️ 9. Generate a Universal Tracking Script

 

  • If you are an Affiliate, follow this guide to help you set up the universal tracking script.
  • If you are an Advertiser, you can skip this step as for your account type a universal tracking script is created manually once you’ve added your Website.

Regardless of your account type (Affiliate or Advertiser), the generated script can be found by the path Tools-> Scripts:

Setting GTM and connecting it to Typeform

⬇️ 10. Adjust the settings in GTM

 

10.1 Follow this guide on how to integrate Google Tag Manager (GTM) with RedTrack and the steps below on Typeform-related insights.

Make sure you’ve created a 1st party cookie variable under the name rtkclickid-store. Without this variable, further GTM integration with RT will not work out.

10.2 Create 3 types of Tags:

Essential elements:

  • Tag  = Custom HTML
  • Triggering = All Pages (Page view)

Script:

The generated script can be found by the path Tools-> Scripts:

Note!

See step 9 of the guide in case of confusion with your universal tracking script.

Essential elements:

  • Type= Custom HTML
  • Triggering= All Elements (All Clicks)

Script:

<script>

function setFormClickIdValue(clickid) {

var currentUrl = new URL(window.location.href);

currentUrl.searchParams.set('rtclickid', clickid)

currentUrl.searchParams.set('contact_type', 'lead')

var pageviewCount = getCookie("pageviewCount");

console.log(currentUrl.href,window.location.href,pageviewCount);

    

if (typeof pageviewCount === "undefined" || parseInt(pageviewCount) < 2) {

window.location.href = currentUrl.href

}

if (!window.location.href.includes('rtclickid')) {

var currentUrl = new URL(window.location.href);

currentUrl.searchParams.set('rtclickid', clickid)

currentUrl.searchParams.set('contact_type', 'lead')

window.location.href = currentUrl.href

}

}

function getCookie(name) {

var value = "; " + document.cookie;

var parts = value.split("; " + name + "=");

if (parts.length == 2) return parts.pop().split(";").shift();

}

if (getCookie('rtkclickid-store') !== null && getCookie('rtkclickid-store') !== undefined && getCookie('rtkclickid-store') !== 'undefined') {

setTimeout(function(){

setFormClickIdValue(getCookie('rtkclickid-store'))

}, 100)

}

</script>

Essential elements:

  • Type= Custom HTML
  • Triggering= Initialization (All Pages)

Script:

<script type="text/javascript">

var pageviewCount = getCookie("pageviewCount");

 

if (typeof pageviewCount === "undefined") {

pageviewCount = 1;

} else {

pageviewCount++;

}

 

setCookie("pageviewCount", pageviewCount, 30);

function getCookie(name) {

var value = "; " + document.cookie;

var parts = value.split("; " + name + "=");

if (parts.length == 2) return parts.pop().split(";").shift();

}

if (getCookie('rtkclickid-store') !== null && getCookie('rtkclickid-store') !== undefined && getCookie('rtkclickid-store') !== 'undefined') {

setTimeout(function(){

setFormClickIdValue(getCookie('rtkclickid-store'))

}, 100)

}

function setCookie(name, value, expires) {

var cookie = name + "=" + value + "; path=/; domain=." + location.hostname.replace(/^www\./i, "");

 

if (typeof expires !== "undefined") {

var now = new Date();

now.setTime(now.getTime() + expires * 24 * 60 * 60 * 1000);

cookie += "; expires=" + now.toUTCString();

}

 

document.cookie = cookie;

}

</script>

⬇️ 11. Connect GTM to Typeform

 

For the integration to work, you need to connect GTM to each added form in your Typeform account. To do that:

11.1 Copy your Google Tag Manager Container ID.

11.2 Go to your Typeform account-> open the needed form-> activate the tab Connect-> Integrations-> find Google Tag Manager-> click on the Connect button next to it:

11.3 Paste the GTM number (you copied within step 11.1) to the popped-up form-> press Save:

 

That’s it. Happy campaigning with RedTrack 😊