A logical progression from segmenting your data in web analytics is to then be able to target those segments. For example, you might want to show a special offer only to loyal repeat customers and not to others.
In a very informative webinar last week by the Google Analytics team on custom variables, one particular example caught my attention: the ability to not only set a custom variable, but also to read its value.
Let’s assume that I set a custom variable called CustomerType on the transaction page that has the possible values New or Repeat, then it sounds like we will be able to do something like this:
<script>var customertype = pageTracker._getVisitorCustomVar(1);
if (customertype = 'Repeat') {
display special offer on the page
}
</script>
The method _getVisitorCustomVar() is described in the GA code site. Cool stuff!
Follow me on
{ 4 trackbacks }
{ 3 comments… read them below or add one }
Michael,
This looks very promising – especially if you were to tie this kind of data driven targeting with a split / mv test from website optimizer.
I noticed you said ‘it sounds like…’ – have you been able to test the code yet to validate the approach works (it seems like it should based on all documentation I’ve seen).
Kudos for sharing this – I’m expecting you’re going to get a lot of traffic over the next few days on this!
Cheers, James.
Hi James,
At the time of the webinar I couldn’t find any documentation on _getVisitorCustomVar(), but it is here now http://code.google.com/apis/analytics/docs/gaJS/gaJSApiBasicConfiguration.html#_gat.GA_Tracker_._getVisitorCustomVar so it looks official now. Will start testing it out.
Cheers,
Michael
Hey Michael,
Have you had a chance to test this feature out yet? Would love to hear if you’ve been able to get this to work and see any examples.
Best,
Kurt