Google Analytics ???

Permalink 1 user found helpful
Tell a newbie - how you can integrate into the site, the system of Google Analytics? And can it be done in principle?

 
pixel8 replied on at Permalink Best Answer Reply
pixel8
hi... you just go to your dashboard -> sidewide settings.. and then you insert your trace code from Google analytics, and you are good to go :-)

hope this helps you!
dibbc replied on at Permalink Reply
dibbc
Hey - I know what you said above works, but I wonder why, because Google says to paste it's code:

"...onto every page you want to track immediately before the closing </head> tag."

And the place where you paste the Tracking Code on the Concrete5 dashboard says:

"Any HTML you paste here will be inserted at the bottom of every page in your website automatically."

So if Google wants the code in the header, and C5 is putting it in the footer, how's it working?
jordanlev replied on at Permalink Reply
jordanlev
Google's instructions are a recommendation for what they think is the best way to implement the code. But it works the same regardless of where it's put on the page (so the place where Concrete5 puts it works just fine). Theoretically it might help your page load faster doing it google's way, but it's arguable whether there's a noticeable difference.

The reason concrete5 puts it in a different place is because google *used to* recommend putting the code there. But a year or two ago they changed their recommendation -- however concrete5 has not changed to reflect this (and for good reason -- all of the existing themes would need to be updated to take this into account, which is probably never going to happen because there are so many different developers of those themes).

There has been some suggestions in the forums of adding TWO different places to paste in analytics code, so people could choose which they prefer, so hopefully that makes it into the system at some point.

But really it doesn't matter -- it works either way.

-Jordan
zoinks replied on at Permalink Reply
Don't you also have to add this to your template:

<? Loader::element('footer_required'); ?>

??

And, if so, does that mean that you can't have another div named "footer"?
jordanlev replied on at Permalink Reply
jordanlev
Yes, you do have to make sure that <?php Loader::element('footer_required'); ?> is in your template (every theme in the marketplace should have that already though, so you don't need to worry about it unless you're building your own theme).

And it doesn't add a <div> of any kind -- just whatever is pasted into the dashboard box. Do a "view source" in your browser (on a site where this is all set up and some GA code has been pasted into the dashboard setting) to see what it actually outputs -- should be exactly the same as what's pasted into the box.