4

I think this solution is not possible when using Google Analytics Universal - I am right?

https://www.distilled.net/blog/seo/first-touch-tracking-in-google-analytics/

Are there other ways to get the first touch source of a conversion?

3

The script would work with some tweaking, the only change would be setting 'custom dimensions' instead of variables.

However, a more elegant solution would be this tag manager implementation which lets you filter by session to view a single users funnel.

Not great for big data but lets you pull case studies.

Edit: I went ahead and tested the Tag Manager method:

  • Create a custom HTML tag, insert this script:
 <script>
 function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1);
        if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
    }
    return "";
 }
 if (!getCookie("firstTouch")) 
 {document.cookie = "firstTouch=" + window.location.pathname;}
 </script>

Tag Manager Custom HTML Tag

  • Add cookie variable Cookie Variable added!

  • Create a custom dimension in Analytics

Custom Dimension added!

  • You can send the custom dimension in all your pageviews (optimal), or to test it you can put the variable into an event label. This will appear in 'Real Time' events then for you to check immediately:

Ta Da!

If you wanted a pure javascript version, then you can edit your push to include firstTouch in the custom dimension like this:

> <script> function getCookie(cname) {
>     var name = cname + "=";
>     var ca = document.cookie.split(';');
>     for(var i=0; i<ca.length; i++) {
>         var c = ca[i];
>         while (c.charAt(0)==' ') c = c.substring(1);
>         if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
>     }
>     return ""; } if (getCookie("firstTouch")) 
>     {var firstTouch = getCookie("firstTouch"));} 
>    else {document.cookie = "firstTouch=" +
> window.location.pathname;} ga('set', 'dimension1', firstTouch);
> </script>
  • Bit of a messy post but may clean it up if anyone actually needs it. I mainly did it as a proof of concept. – L Martin Mar 10 '16 at 17:46
  • At the moment you are only tracking the first site the user visited. It would be a first profit. But what about the referall, medium, source, etc..? Do you have an idea to get this information? – rakete Mar 11 '16 at 8:42
  • If you want to weight conversions by their first contact, you're looking for a First Interaction Attribution Model. This is under your 'View' - > 'Personal Tools & Assets' -> 'Attribution Models'. This will mean the first touch's referral gets more weight. When you have e-commerce or a goal value set up, it will proportionally weight the value. Look at the values against each referral source and you'll get a great budget estimate. The first interaction model gives 100% of the value to the first channel they use. – L Martin Mar 11 '16 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.