Universal tracking script functionality
What’s a Universal tracking script in RedTrack?
Universal tracking script in RedTrack in simple words: it reads tracking parameters of the click -> sends this info to RedTrack -> then based on the read tracking parameters plus the campaign’s id (or absence of this id in case of direct visits) it recognizes the campaign details and figures out how the click should be parsed next -> it gets from RedTrack a unique id of this click and saves it on the 1st party cookie.
It performs additional functions and transforms into different types of scripts depending on the clients and their needs:
√ functions of the universal tracking script:
- for affiliate marketers, it can help send traffic from multiple sources to one Landing Page with no-redirect tracking;
- for those owning an online store, it offers the possibility to track visits from various paid and organic channels they have;
- for those using Facebook, Google, etc. alongside monitoring organic traffic on the same page, our universal tracking script is able to track your purchased and organic traffic separately for each source.
√ types of the universal tracking script:
- type 1: default – for advertisers, add to site/storefront (for those who who don’t have any landing or pre-landing pages);
- type 2: /click support – for affiliates, add to landing pages;
- type 3: /pre-click support – for affiliates, add pre-landing pages.
How to create and apply a universal tracking script?
1. Create target Campaigns. One of them should be a Default campaign for the unattributed (aka organic) traffic. Other campaigns are related to your traffic sources. Create as many as you use.
In RedTrack template for the unattributed traffic is called “Other”. Click here for more details on how to create a default campaign.
2. Generate your unique script based on your needs and add it to your page code. To do that:
2.1 go to Tools -> Scripts -> New:
2.2 fill in the mandatory fields to generate the script accordingly:
Expand for tips on how to fill in the fields
Script type – select one of the 3 types.
- default – choose this one if you plan to work with your own website (e.g. e-com store) where a visitor can click on any link or visit any tab while the target action is tracked always on some other page no matter what the visitor path was before.
- /click support – use it when you lead the visitor from your landing page to a 3rd party offer and use domain.com/click CTA link format
- /pre-click support – same as /click support but for a prelanding page with domain.com/preclick CTA link
Title – give your script a name
Domain – choose a custom tracking domain that will be used in that script
For advertisers, it’s better to use a custom tracking domain for the concrete website where they want to put a script on. For affiliate marketers tying a concrete domain to the concrete landing page is not necessary, you can just use one custom tracking domain for everything.
Default campaign – organic traffic campaign created within step 1
Attribution – set the attribution model you want to use
- First click – first recorded inbound click
- Last click – last recorded inbound click
- Last paid click – last recorded inbound click with tracking parameters
We always recommend using Last paid click attribution, since that in the most accurate way measures which marketing touchpoint a customer last clicked on or engaged with before purchasing, and gives it 100% of the credit. For the First click attribution data RT has a Conversion path report.
Attribution window – set the attribution window, the period for the first click, and last paid click models
Cookie domain – the root domain to place a cookie. This is the root domain of your website.
Example: your script will run on name1.domain.com and name2.domain.com. Please specify domain.com as the root domain (not https://domain.com and not www.domain.com)
Generated script – once you save the changes, the ready-to-use script will be generated
3. Add the script to your landing page code. It is preferable to place the universal tracking script at the end of the body section of the landing page script.
4. After that, go to Campaign -> Tracking options -> go to the tab Universal script and copy the tracking parameters under this tab:
5. Add the parameters string to the end of your URLs depending on the traffic source used.
RedTrack will identify the incoming traffic based on the “cmpid” parameter. If there is no “cmpid” in the URL, the traffic will be attributed to the default organic traffic campaign.