I'm testing some referral tracking and it appears my __utmz cookie will not update when the visitor returns later or when they close the borowser and re-opens it up and goes the site as a (direct) visitor. It updates of course if I clear all caches or if someone comes from another referring site but not as direct visitors. Any idea why this would be happening?
First i dnt knw what you are interpreting about cookies.let me elaborate it. if some 1 landed from your site though search engines and other referral sites then _utmz cookies will be used for tracking and it will updated with each new page views to your website and it expired 6 months from set/update. I think When user clear their cookies and after wards visited your site from typing name in browser then it call us direct & new visit. because ga nt able to track if user clear their cookies. and i have 1 question for you.. how did u came to know that first visitor came from search engine or referral site and then visitor is coming direct ???
dipali, thank you for your reply. Let me elaborate on my question a bit. I'm trying to record the initial referral using pageTracker._setCustomVar. I first check to see if the user is a new user. If they are, I set a custom var labled as 'Initial Referral' and assign the utmcsr value (source) from the __utmz cookie. The scope for the _setCustomVar is 1 for the visitor level so it should stay persistent for future visits until the cookie expired. To set the custom var, google documentation says that I need to set it before the pageTracker._trackPageview(), but my code requires that the cookies in __utmz be updated before I run my code. So I'm running the following: pageTracker._trackPageview(); someCode(); pageTracker._trackPageview() where someCode() has the setCustomVar() in it. I read that having 2 trackPageview() will not have any effect but am not sure if this is related. This of course all works if you manually remove the cookies, but the users won't be doing this. Also, the __utmz is suppose to update on all visitors for every pageview.