Tracking Organic Traffic

Organic traffic can be easily tracked with Direct Tracking Pixel. By adding a specially modified Direct Tracking Script to your landing page or offer, you can track visits that come not from Direct Tracking URL, but from other web pages or search engines.

This guide presents you a recommended approach of setting up a campaign funnel. This approach requires you to create a dedicated campaign to track only the traffic that comes from organic sources. It means that you will have two types of campaigns for the same funnel:

  • Campaign for paid traffic. This one works like a normal campaign created with Direct Tracking Pixel.

  • Campaign for organic traffic. This campaign requires a small modification to be done to the Direct Tracking Script.

The way the Direct Tracking Pixel usually works is the campaign ID is passed to a Direct Tracking Script in the cpid parameter when a Direct Tracking URL is activated. The Direct Tracking Script knows then the campaign ID and it is able to make the correct request to Voluum. This does not apply to organic traffic, where visitors stumble upon you landing or offer page without activating the Direct Tracking URL. In that case, the Direct Tracking Script has to be manually updated with a campaign ID of the organic campaign. So when a visitor will come from a Direct Tracking URL, which will pass the campaign ID of the paid campaign, the Direct Tracking Script will ask Voluum to assign this visit to this campaign. And when a visitor comes to your landing or offer pages organically, the Direct Tracking Script will assign this visit to the campaign that matches the campaign ID you have implemented this script with.

Table of Contents
I. Create a Paid Traffic Campaign

In the first step, create a normal campaign with the Direct Tracking Pixel, as described in or Setting Up a Direct Tracking Pixel for LandersSetting Up a Direct Tracking Pixel for Offers articles. Name your campaign in a way that will allow you to easily distinguish it from an organic campaign. Do not implement a Direct Tracking Script on a landing page or offer page yet. It has to be updated with the campaign ID of an organic campaign that you are going to create in the second step.

II. Create an Organic Campaign

Create another campaign in the same manner. Use the same lander and offer elements as in the paid campaign but create a separate traffic source for organic traffic. Name your campaign in a way that will allow you to distinguish it easily from a paid campaign. Copy the Direct Tracking script to any text editing tool.

III. Get the Campaign ID

To be able to prepare the script adequately for the organic traffic, you need to get a Voluum's campaign ID of the organic campaign. If you do not see the Campaign ID in Voluum, click the button and check the visibility of this column. Once you see the campaign ID of the organic campaign, copy it to the clipboard.columns.png


Your campaign ID should look like this:

IV. Modify the Pixel to Track Organic Traffic

Having both, the pixel and the campaign ID, you are ready to modify the code block to be able to track visitors' actions that come from the organic traffic:

  1. Your Direct tracking pixel in a text editing tool looks like this:

        .dtpcnt {
            opacity: 0;
        (function(e, c, f, l, m, b, n, r, d, g, p, a, h, k) {
            function q() {
                for (var a = c.querySelectorAll(".dtpcnt"), b = 0, d = a.length; b < d; b++) a[b][n] = a[b][n].replace(/(^|\s+)dtpcnt($|\s+)/g, "")
            e[d] || (e[d] = function() {
                (e[d].q = e[d].q || []).push(arguments)
            }, k = c[l], c[l] = function() {
                k && k.apply(this, arguments);
                if (/loaded|interactive|complete/.test(c.readyState))
                    for (; a = c[m][g++];) /\/?click($|(\/[0-9]+)?$)/.test(a.pathname) && (a[b] = "javascript:" + d + '.l="' + a[b] + '",void 0')
            }, setTimeout(function() {
                a = c.createElement("script");
                h = c.scripts[0];
                a.async = 1;
                a.src = p + (-1 === p.indexOf("?") ? "?" : "&") + "lpref=" + f(c.referrer) + "&lpurl=" + f(location[b]) + "&lpt=" + f(c.title) + "&t=" + (new Date).getTime();
                a[r] = function() {
                    for (g = 0; a = c[m][g++];) /dtpCallback\.l/.test(a[b]) && (a[b] = a[b].match(/dtpCallback\.l="([^"]+)/)[1]);
                h.parentNode.insertBefore(a, h)
            }, 0), setTimeout(q, 7E3))
        })(window, document, encodeURIComponent, "onreadystatechange", "links", "href", "className", "onerror", "dtpCallback", 0, "");
        <link href="" rel="stylesheet" />
  2. Search for the following phrase in this script: http. It appears twice in the code block.

    In the above example, this is a fifth and second to last line at the bottom of the snippet:

    • The fifth to last code line:

      })(window, document, encodeURIComponent, "onreadystatechange", "links", "href", "className", "onerror", "dtpCallback", 0, "");
    • The second to last code line:

          <link href="" rel="stylesheet" />
  3. In both code lines, you should see the links that start with http:// (or https:// if you use a secure connection in your campaign funnel).

  4. Paste the campaign ID of the organic campaign after the d/ but before .js symbol in each of those links.

    • The fifth to last code line:

      })(window, document, encodeURIComponent, "onreadystatechange", "links", "href", "className", "onerror", "dtpCallback", 0, "");
    • The second to last code line:

          <link href="" rel="stylesheet" />
  5. Save the modified code block. Now, you can prepare the landing page.

V. Paste the Script to Your Landing Page or Offer Page

Once you have adapted the pixel to track organic traffic, you need to add it to the landing page:

  1. Go to the landing page that you host externally.

  2. Within the <head> section of your landing page, paste the script that you have modified in the previous section of this guide.

  3. Since now, every visit to this landing page that is organic will be registered within the organic-type campaign you have created in Voluum.