Track Organic Traffic

Organic traffic can be easily tracked with direct tracking. By adding a specially modified lander tracking script to your lander, 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. You can create a separate campaign for tracking paid traffic, either redirect or direct.

Table of Contents

How Does It Work?

The way direct tracking usually works is the campaign ID is passed to a direct tracking script in the cpid parameter when a visitor activates a direct tracking URL. The direct tracking script is then 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 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 updated this script with.

I. (Optional) Create a Paid Traffic Campaign

In order to track paid traffic along your organic traffic, you can create a separate campaign with either method of tracking. Name your campaign in a way that will allow you to easily distinguish it from an organic campaign. If you have decided to create a campaign with a direct method, 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.

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.

dtp8.png

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

dtp9.png

Your campaign ID should look like this:

860024a2-1231-436f-85ba-c72aa86482af

IV. Modify the script to Track Organic Traffic

Having both, the direct tracking script 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 script in a text editing tool looks like this:

    <style>
        .dtpcnt {
            opacity: 0;
        }
    </style>
    <script>
        (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]);
                    q()
                };
                h.parentNode.insertBefore(a, h)
            }, 0), setTimeout(q, 7E3))
        })(window, document, encodeURIComponent, "onreadystatechange", "links", "href", "className", "onerror", "dtpCallback", 0, "http://your_Voluum_domain.com/d/.js");
    </script>
    <noscript>
        <link href="http://your_Voluum_domain.com/d/.js?noscript=true" rel="stylesheet" />
    </noscript>
  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, "http://your_Voluum_domain.com/d/.js");
    • The second to last code line:

          <link href="http://your_Voluum_domain.com/d/.js?noscript=true" 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, "http://your_Voluum_domain.com/d/87dscw2-bf87-44h3-a43b-13434fc02f31.js");
    • The second to last code line:

          <link href="http://your_Voluum_domain.com/d/87dscw2-bf87-44h3-a43b-13434fc02f31.js?noscript=true" 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. Paste the modified script at the bottom of the <body> section of your lander.

  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.