ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Google Analytics only showing home page hits

November 24, 2010 12:15pm

Subscribe [4]
  • #1 / Nov 24, 2010 12:15pm

    inphantry

    12 posts

    I just received an email from the client saying that GA is only showing hits for the homepage and not for internal pages. I was using an old GA code snippet (that was working on the site before the redesign just launched).

    [removed]
                var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
                [removed](unescape("[removed][removed]"));
            [removed]
            [removed]
                try{
                    var pageTracker = _gat._getTracker("UA-488256-1");
                    pageTracker._trackPageview();
                }catch(err) {}
            [removed]

    It is in the footer of the site throughout. I suspect it is because the htaccess rewrites are causing an issue. I am doing the standard rewrites to get rid of the index.php in the EE url. Also I’m doing some other rewrites but that shouldn’t affect every page. So I just went into analytics and got the new embed code. I’m hoping that will fix it but highly doubt it, as this old code was working just fine before the new site launched a few days ago. It has to do with EE or something I did with EE…

    You can check it out here: http://fitwoman.com


    Thanks!

  • #2 / Nov 24, 2010 4:57pm

    Ingmar

    29245 posts

    Not sure this is an EE issue as such, to be honest… since you mentioned url rewriting, does it work correctly without it?

  • #3 / Nov 24, 2010 5:01pm

    inphantry

    12 posts

    Not sure if it works without it. I can’t really turn it off as the site is live and all… The rewriting is literally what the EE instructions say to do to get rid of index.php. Straight from the EE site.

    RewriteCond $1 ^(global_css|global_js|global|weblog|blogfeed|phototour|member|no-results|search|brochure|xmlsitemap|Forum_Name|Homepage|our-program|sitemap|alumnae-resources|about-us|blog|expert-advice|womens-weight-loss-retreat|adult-weight-loss-camp|fat-farm|health-spa|weight-loss-program|healthy-weight-loss-program|privacy-policy|press|contact-us|P[0-9]{2,8}) [NC] 
    RewriteRule ^(.*)$ /home/112147/domains/fitwoman.com/html/index.php/$1 [L]

    Is this wrong? As I said, I just followed one of the EE tutorials off the official EE docs.

  • #4 / Nov 25, 2010 2:09am

    John Henry Donovan

    12339 posts

    inphantry,

    Is this wrong? As I said, I just followed one of the EE tutorials off the official EE docs.

    We dont support the removal of the index.php from the URL. These are our official docs. You may have seen the tutorial on our community Wiki?


    You GA code is appearing on every page so I don’t suspect EE is interfering with it.
    Maybe your other tracking code (AliveChat)is?

    Did you double check GA reports yourself? Sometimes a client may miss something.

    You also mentioned other rewrites. What were they?


    Moving this to the CodeShare Corner as more appropriate there

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases