We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Help with tagging a page for use with Google Analytics

Development and Programming

vcom's avatar
vcom
21 posts
15 years ago
vcom's avatar vcom

Hello, EE Support,

I’m sure you’re familiar with my sitution - new to EE, used 3rd party developer who won’t return calls so now I’m stuck trying to figure this out with limited knowledge.

I need to put GA tags on our site and need help. Is there a section in the User Guide that would help? I skimmed through it but didn’t find anything.

Can I just go to one of the templates or pages we’ve created and insert there? Thank you in advance.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

vcom

You’ll need to insert the code somewhere in the templates. Hopefully the developer has some form of “included” (embeded) template that can make this process simple. If not, you may be stuck editing multiple templates to get this done.

I hope this helps.

Erik

       
vcom's avatar
vcom
21 posts
15 years ago
vcom's avatar vcom

Thanks, Erik. If we want to track specific pages then we’d have to insert it in each page?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Potentially. It depends on how your templates and channels are setup and what your goals with GA are.

       
vcom's avatar
vcom
21 posts
15 years ago
vcom's avatar vcom

Had a chat w/my internal customer. Basically, she wants every page tracked for visitors. There is a site template. If I add every GA generated code to that template, would that suffice?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Yes, a single GA tracking code for the site profile embedded in the template(s) would suffice. Drilling down to specific pages would be easily done from within the Google Analytics panel.

       
vcom's avatar
vcom
21 posts
15 years ago
vcom's avatar vcom

I just need ONE code and the tracking of all other pages is achieved via GA - did I understand that correctly?

I’ve been reading the install guide on the GA site and all I need to do is add this snippet before the /body tag, correct? (I would replace the xxxxxx with the actual code).

[removed]
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
[removed](unescape("[removed][removed]"));
[removed]
[removed]
try{ 
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
} catch(err) {} 
[removed]
       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Yes, that is correct.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.