1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

__utmz cookie not updating on direct traffic

Discussion in 'Google Analytics' started by sethfair, Jan 6, 2010.

  1. #1
    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?
     
    sethfair, Jan 6, 2010 IP
  2. dipali

    dipali Peon

    Messages:
    450
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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, Jan 6, 2010 IP
  3. sethfair

    sethfair Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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.
     
    sethfair, Jan 7, 2010 IP