[Released] The Upgraded Organic Tracking Script

What is the TrackingDesk Organic Tracking Script?

The Organic Tracking script is a javascript that you add to your website or landing page. It’s purpose is to track your traffic when the visitor loads your page. As opposed to a regular campaign URL (AKA tracking link, redirect URL), the visitors can navigate to your site naturally from a Google search or a backlink and it will be tracked as if it had clicked on a campaign URL.

Naturally, the visitor’s conversion journey is being tracked and attributed as usual, together with associated revenues.

The first version of the organic tracking script was released in the course of 2016 and the script can be found in your campaign’s settings, under the campaign URL field.

trackingdesk organic script

Organic Tracking Script: Background

Over the past few months, we noticed that users were using the tracking script, not only to track organic traffic but also paid campaigns. Not only on AdWords, Bing, and Twitter, but also Social Networks and email marketing.

The primary reason for that was to avoid using the regular campaign URLs, which are essentially redirect tracking links. For some strange reasons, those networks don’t really like advertisers using redirect URLs. (If you’re not sure why you should perhaps pay a visit to the Black Hat World forum;)

But in a nutshell, the TrackingDesk URL’s, when used wisely or in a “black hat” manner, allow you to redirect traffic according to various criteria, such as GEO, Device, Language or day parting, to name only a few. Consequently, AdWords, Bing and others are scrutinizing those ads with more eyes and you can easily find yourself having ads being disapproved.

Anyway, while usage of the organic tracking script was increasing, demand for additional features and functionalities was also on the rise. So we decided to investigate the matter, to see how we could turn what was initially a “side project”, into a feature that could be used across the board, in a more powerful way.

Organic Tracking Script V 1.0

  • Javascript
  • Event Tracking:
    • Visits
    • Clicks
    • Installs
    • CPL
    • CPA
    • CPS + recurring sales
  • Native Tracking Attributes
    • OS
    • Browser
    • Country

What is / (was) missing?

All custom variables and tokens were missing. This didn’t really matter since the traffic was organic and there are no “tokens” for such traffic.

However, when you advertise or publish a post on social media, depending on the social media sharing platform you are using, you can capture UTM variables automatically.

Let’s take the example of Buffer, which we use to share our content on social media.

When we share one of our blog posts,  the URL we post is stripped of any parameters.


Buffer then shortens our link, which becomes something like:


When users click on the link, they are redirected to the blog post while the URL is being updated with UTM query-strings and values.


Naturally, our Google Analytics code picks up these values and displays them in our acquisition reports, together with engagement and conversion information.

Unfortunately, when conversions are originating from affiliate networks, Google Analytics is powerless, and the acquisition report will only show your traffic reports and any conversion events will be missing.

Another significant detail is the way a regular campaign URL looks when you share it on a Social Network.

This is where the new organic tracking script steps in.

The Upgraded Organic Script Features:

In a nutshell, the new script will capture any query string parameters and values that show in your destination URL.


Query string parameters?

Query String Parameters and values.

  • utm_content=buffer5648
  • utm_medium=social
  • utm_source=facebook.com
  • utm_campaign=buffer

NB: In addition to those values, the visit event ID will also be captured and displayed in your TrackingDesk Analytics.

Additional data:

  • Referrer URL from which originated the visit
  • The Page URL where the visitor landed – Very useful when you set the script across your site
  • The Page Title where the visitor landed – Visually more friendly
  • Country
  • Operating System
  • Browser
  • Google Analytics Client ID (Read more about Google Anaytics Affiliate integration)

In the Chrome Developer Mode (F12), you can clearly see those values:

utm query strings

How can the organic tracking script be used for paid campaigns?

First of all, you need to make a switch in your head, regarding the way you track campaigns using the organic script. In fact, you should assume that you will set up one single campaign that will be used across several traffic sources. Very much like, the way you setup Google Analytics for a website, you will add your TrackingDesk Organic Script on the page you want to include in your campaigns.

Before you can add the script, you will need to go through a few steps within TrackingDesk.

For the purpose of this tutorial, let’s say that you promote your page(s) on AdWords and across social media networks with Buffer.

Define the Traffic Source:

To simplify this process, we have predefined an “organic” traffic source, which can be added in a single click.

This Traffic Source carries the basic UTM parameters and the eid query string which will capture the visit Event ID value.

When adding the traffic source, we recommend to update the name so you can easily recognize it in your account.

The reason the parameters are empty is that each traffic source will fill the “blanks” automatically and not according to set “tokens” like you normally see in other traffic sources (ex: {keyword})

Now, it is important to understand that some traffic sources do not use all the parameters and some use additional parameters.

Buffer, for instance, doesn’t use the utm_term query string, but AdWords and Bing use it. Therefore, in your TrackingDesk analytics, some of the values will be “missing” in the case that the traffic originated from a source that does not use such parameter.

Another important aspect of the settings is that some traffic sources use additional parameters that are specific to them. For instance, AdWords uses the GCLID which is automatically appended to your campaign URL. Consequently, if you want to run a campaign on AdWords, the GCLID parameter needs to be defined in the Traffic Source settings, so that it can be recorded by TrackingDesk.

AdWords also uses the parameter url={lpurl} which is used in their Tracking Templates feature described in this article

Another important aspect of the script is that as long as it is present on your pages, the TrackingDesk Call To Action URLs will work like on any other campaigns and landing page.

For example, if you are promoting 3 offers on your blog, you will need to create a campaign where you set the landing page as your homepage, and you associate the homepage with the 3 different offers.

  • CTA/1 associated with Offer X
  • CTA/2 Associated with Offer Y
  • CTA/3 Associated with Offer Z

You will add the organic script to all the blog’s pages (you can update your WordPress header.php file).

No matter through which page, the visitor enters your site, he will get the TrackingDesk cookie and campaign information. The visitor can then browse through your site, click on one of the CTA from any of the pages, and be redirected to the proper offer link.

How to add additional parameters to the Traffic Source:

Define those parameters as you would normally do for any other traffic source. [spacer height=”20px”]

adwords gclid
[spacer height=”20px”]

NB: Since AdWords appends automatically the GCLID to your URL, you will need to remove it from the adwords tracking template (see below)

Create the campaign:

  1. Select the Organic Traffic Source you have previously setup
  2. Search / Select the Landing Page
    1. Remember: Any of the site’s Landing Page that will carry the script will be tracked
    2. You don’t need to define all the site’s landing pages in TrackingDesk [spacer height=”20px”]
  3. Select the offer(s) that will be promoted on the landing page [spacer height=”20px”]Associate Offer link to a landing page[spacer height=”20px”]
  4. Save
    The Regular Campaign URL shows up on the campaign’s settings.[spacer height=”20px”]
  5. Copy / Paste the campaign URL into a notepad[spacer height=”20px”]
  6. Remove the base URL and all query strings from the URL except the url={lpurl}. If your AdWords settings and Google Analytics settings are set for AutoTagging, all UTM query string parameters will be appended to your URL by AdWords.
    [spacer height=”20px”]
  7. These query strings, parameters, and values will be set as your AdWords tracking template
    1. Add the Final URL -[spacer height=”20px”] ex:


      [spacer height=”20px”]

    2. Add the Tracking Template[spacer height=”20px”]
      1. {lpurl}?url={lpurl}
        [spacer height=”20px”]
    3. Click the Test button [spacer height=”20px”]adwords tracking template
      [spacer height=”20px”]
  8. Go back to your Ad Group Settings and open the AdGroup URL Options
    [spacer height=”20px”]
  9. Paste your tracking template[spacer height=”20px”]
    {lpurl}?url={lpurl}[spacer height="20px"]

    From now on, all ads created under this adgroup will use this tracking template.

    AdWords Postback URL
    Learn how to use the AdWords Postback URL so you can send your conversions to AdWords automatically.

Now that we have our AdWords campaign set, we can go ahead and schedule our social media posts in Buffer.

  1. Open your Buffer app
  2. Copy & Paste your blog post URLs into the content box
  3. Schedule

Once the traffic starts flowing to your pages from your different campaigns, you can check your analytics and group the results according to the attributes that matter to you.

trackingdesk analytics

[spacer height=”20px”]

For affiliates who are active in content marketing and promote their posts on social media, native ad networks, and email marketing, the organic tracking script allows a few things.

  1. You create one campaign which can be used on several ad networks and traffic types.
  2. You can truly analyze the ROI of your content
  3. You can automate your content marketing campaigns with ease.

Additional advantages

Did I mention that MailChimp and other email marketing platform also use UTM query strings?

When creating an email shoot, you can tick the option to track the campaign with Google Analytics. Whether you use Google Analytics or not doesn’t matter because what it really means is that MailChimp will append UTM query strings and values to the URL’s promoted on your campaign.

Note, however, that the values sent by Mailchimp are not very “friendly” so you might want to add your own values in the UTM parameters so you can better visualize your results in your TrackingDesk Analytics.

Tip to automate your email marketing

One of the cool features you will find in MailChimp is their RSS to Email Campaigns. Simply put, it’s a campaign that will be sent to your subscribers according to a set schedule (daily, weekly etc… ). The campaign content will be populated by your blog RSS feed.

So, if you publish blog posts on a regular basis, your subscribers will automatically receive your updates and by clicking on your campaign URL’s, they will be redirected to your blog and be tracked.

Take Away

I am a great enthusiast of marketing automation.

You are probably thinking: Could this be the reason that explains why we receive so many emails from the TrackingDesk team???

And I think that the nature of affiliate marketing requires automation, simply because most affiliate marketers work on their own. Having the ability to amplify your content reach, across various platforms is a step toward automation that expands your revenues, in a natural and organic manner.

The examples that I provided in this post can be applied immediately. But more importantly, now that you know the basics, you should take a step back to contemplate your campaigns and see how the upgraded organic tracking script can be used to improve your campaign’s performances.

Got questions, comments or automation ideas – Share them in the box below.

You know someone who could benefit from this post? Share the love!

Share on facebook
Share on google
Share on twitter
Share on linkedin

Discover what your traffic is really worth!

Easy setup, weekly webinars and personal demo

Start your free trial

All Features | Free Personal Demo
Free 14-day trial | Easy setup | Cancel any time

TrackingDesk service was discontinued in June 2019.

If you are looking for a platform to track your Google Ads and Facebook campaigns, we highly recommend AnyTrack conversion data platform.


Be the first to receive exciting news, features, and special offers from TrackingDesk


TrackingDesk 2019 | Terms of service | Privacy Policy