It's time for a quick mid-week geek-out - I wanted to collect together a bunch of resources I have written on first touch tracking in Google Analytics including (for the first time that I'm aware of), the technical implementation details:
- Following a Whiteboard Friday recorded when I was in Seattle a month ago or so
- I hurriedly wrote a post explaining general principles of how to get past last touch attribution in Google Analytics
- which it turned out was (quite reasonably) not enough for some of our readers (and I really wasn't happy with the level of detail)
- so I have done my best to go above and beyond with detailed instructions on How to do First Touch Tracking in Google Analytics
- while digging around in GA and JavaScript to put this all together (a combination I probably shouldn't have been doing) I discovered an interesting difficulty if you are going to migrate from the now-deprecated _setVar to _setCustomVar and wrote a post about it over on Search Engine Land.
If you're the kind of person that unwraps your birthday presents early, you can skip to the punchline, grab the code you need to get first touch tracking working from Google code (don't forget to read the instructions!). Here's the meat from my detailed post:
Include following code anywhere above the Google Analytics code script in your page code:
<script type="text/javascript"
src="https://attributiontrackingga.googlecode.com/svn/trunk/distilled.FirstTouch.js">
</script>
Move your GA code above any Website Optimizer code or anything from Google that might write a visitor (__utma) cookie and look for:
var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
pageTracker._trackPageview();
In between those two lines, you want to put the following line:
distilledFirstTouch(pageTracker);
Oh, and don't forget all of this is provided as is, with no warranty. I hope it will help you out, but only you are responsible for changes you make to your website and tracking code. Be extremely careful with live profiles and remember that you will need to do something different if you already use custom variables.
That's all for now folks. Enjoy your analytics, don't forget to drop comments with improvements, tips, tricks, abuse for writing such a short post etc. and if you need a primer on Excel to make the most of your new-found data, you can check out the recording of my conference call on how to be an Excel ninja (sign up for future calls here).
To distract you from this spectacularly short post, here are some really big things found on the internet this week:
Check out the depth of the ocean:
As well as the size of the earth:
I also recommend watching this one.
Haha, the second part of that post really made me laugh. Well done. I think this post is a little too vague however... Oh well, we all need our lazy days.
*runs*
Very interesting Will-I'm going to get this implemented asap. With regards to multi touch tracking does anyone have any software/service recommendations? I've seen the pain that Atlas inflicts on people and would rather steer clear for now...
Haha! Again, nice and entertaining post :)
LOL. It's seems that everybody did their giant stars video. Here is what I have done: https://www.youtube.com/watch?v=65qEqwO7SB4
Nice post. And not only talking about the second part of the post!
On your next post, i'll expect a video about spacetime and relativity :P
Thanks to you being on a few recent Whiteboard Friday's, I read your entire post in your accent (of course not as well as you would.)
I can't say it better than gfiorelli1 said it, small barrel, good wine :)
Interesting that in his opening keynote at SES London this week, Analytics legend and now Google guy Avinash Kaushik was slagging off first click attribution, likening it to "crediting your first girlfriend with your current marriage" (LOL). I think his argument was based on the fact that it's misleading data for allocating budgets to different channels - ie display ad people can say "we sent those conversions" when actually it was a long tail search query or email offer in the end. I think there is an argument the other way too - that its important to know how a site was initially found by a customer - but ultimately multi-touch tracking is the way forward for me as I know you would agree with.
Your thoughts on this Will?
Yeah - I saw that - I included a link to your tweet in my post over at Distilled. I don't think Avinash thinks it's that simple (nor do I). The use of this in my opinion is to get past those graphs showing total conversions / revenue by source which always skew towards direct and branded. I think it's useful at a big-picture marketing level more than a detail tactical level very often.
I am no JS expert, but… if you decode https://www.google-analytics.com/ga.jsusing https://jsbeautifier.org/ ...you will see that there is a variable called "T" (case sensitive) fordecodeURIComponent & decodeURI built into the native ga.jsSo you could use this pre-existing function to improve load times of thescript?----------------------T = function (window, location) { var this = decodeURIComponent, t; window = window.split("+").join(" "); if (this instanceof Function) try {t = location ? decodeURI(window) :this(window)} catch (k) {t = unescape(window)} else t = unescape(window); return t},----------------------ThanksPhil.
SEO : I would like to be able to have first click wins in one Analytics profile and Last Click in another – is this possible?
thanksJustin Alex
love the video..mind blowing
nice post will, thumbs up
Hehehe...
I like the double feature at the end of your post Will (from the deepest to the infinite could be its name).
Thanks for short post... in Italy we say "small barrel good wine" and your post is one of that kind.
Thank you - I like that saying!
I just stumbled across a company (while looking for a phone call tracking solution, actually) that has an impressive way of attributing marketing sources to conversions on a website.
From their site:
"Convertro Media Attribution Engine assigns each referring source with the proper credit based upon its contribution to the conversion event (proportional credit). This ensures that all traffic sources are rewarded according to their contribution.
Most traditional analytics bidding tools are give 100% credit to the last known paid source or the first known paid source.
Given that, on average, we see 3.3 sources of traffic for each conversion, crediting the first or last known paid source exclusively is a flawed methodology that will invariably lead to inaccurate allocation of credit."
www.convertro.com
it seems pretty 'high-tech', they also, have impressive way of tracking users across cookies.
Cool company to look into.
I know this sounds like a pitch. But it isn't. I just thought Id share this little gem of a company I discovered.
In addition to Convertro another player in the attribution space I came across recently is Clearsaleing - https://www.clearsaleing.com/
I haven't had the opportunity to test these solutions yet, but its good to see commercialized solutions start to appear in this area.
If anyone has any experience of these products I have added them to MarketingToolRatings.com under the Analytics category.
I can't explain how happy this post makes me. I would try, but I think I would frighten people. I've been trying to implement this myself with no luck...
I heart SEOMoz.
Great post!
I just saw the whiteboard video a couple of days ago and have had on my to do list, to figureout how to actually set it up, since.
Sometimes being lazy actually does pay out ;)