subscribe-button feedburn rss

Country Specific Tracking how to track Google.ie from .co.uk from .com

by Paul Anthony

I’ve just dumped this bad boy into my footer code, hopefully should start to show the breakdown of visitors from Google.ie verses .co.uk and .com

Anyone convert this to php for my blog please?

<%Dim myvar,track

%><%

track = "false"

If InStr(Request.ServerVariables("HTTP_REFERER"), "google.ie") > 0 Then

track = "true"

myvar = ".ie"

Else

If InStr(Request.ServerVariables("HTTP_REFERER"), "google.co.uk") > 0 Then

myvar = ".couk"

track = "true"

Else

If InStr(Request.ServerVariables("HTTP_REFERER"), "google.com") > 0 Then

myvar = ".com"

track = "true"

End If

End If

End If

%>

<% If track = "true" Then %>

_utmSetVar(<%=myvar%>);

<% End If %>

Share the Love

No comments, leave your comment or trackback.

Leave us your thoughts.