Options

Google Analytics filter

StumpyStumpy Registered Users Posts: 57 Big grins
edited April 29, 2009 in SmugMug Pro Sales Support
Hi,

I have set up Google Analytics for my SmugMug site and it's working great. I set a filter with my URL to filter out my own hits, but there is a problem. The URL registered with GA is my domain, www.kellerphotographic.com. The filter is working fine when I access THIS URL from my own computer. However, if I want to change anything in my SmugMug site, I have to log in to SmugMug, which automatically takes me to my SumgMug home page, http://islandshooter.smugmug.com/. I don't have GA set up for this URL, so my filter is ineffective for these hits. Is there any way to add the URL http://islandshooter.smugmug.com/ to my GA for www.kellerphotographic.com?

Thanks in advance!
Steven Keller
www.kellerphotographics.com

Comments

  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 20, 2009
    It just occurred to me that you could bracket the Google code in your page so that it doesn't do anything whenever you are logged in, regardless of domain.

    Change this code in your custom footer:
    [B]<[/B]script type="text/javascript"[B]>[/B]
    try {
    var pageTracker = _gat._getTracker("UA-8337266-1");
    pageTracker._trackPageview();
    } catch(err) {}[B]<[/B]/script[B]>[/B]
    
    to this:
    [B]<[/B]script type="text/javascript"[B]>[/B]
    try {
        if (!YD.hasClass(document.body, "loggedIn")) {
            var pageTracker = _gat._getTracker("UA-8337266-1");
            pageTracker._trackPageview();
        }
    } catch(err) {}
    [B]<[/B]/script[B]>[/B]
    
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    angevin1angevin1 Registered Users Posts: 3,403 Major grins
    edited April 29, 2009
    Hi there,

    I tried adding a Google analytic's to my Website: www.tomwisephotos.com But cannot get the pages to work correctly afterward. When I do add it, I put it in the JS footer and try it with/without the ********-/******** . EIther way, it continues to load my Main page. Any help or ideas where I am wrong here.

    Thanks in advance~tom
    tom wise
Sign In or Register to comment.