How do I install Google Analytics to my Concrete5 website?

Permalink 2 users found helpful
Im not quite sure where/how to insert the Google Analytics tracking code?

I've tried adding it to the Home Page content block, but that didnt work.

Any help would be greatly appreciated!

View Replies: View Best Answer
VidalThemes replied on at Permalink Best Answer Reply
Hi There,

Hover your dashboard button and select "systems and settings" under the heading "seo and statistics" you will see "tracking codes" click that and then paste your code in there.
zoinks replied on at Permalink Reply
Should Google Analytics be in the header or footer with C5? I think GA recommends header for some weird reason, but then I think I read it should be footer in C5. Any idea?
Scafidi454 replied on at Permalink Reply
Putting the script into the "page header" on the main page does yield results. However, putting it into subsequent pages / page types doesn't.

Where are the page templates for active pages stored?

I just found out, earlier this morning, that the maintenance_mode.php file that the site points to in order to display to public is not actually in /**/concrete/views/frontend - Instead, it's in public_html/updates/concrete5.7.5.8_remote_updater/concrete/views/frontend - So, maybe my theme pages (to insert the tracking code) is somewhere in there?

I'll keep digging.
Scafidi454 replied on at Permalink Reply
Here's the easiest thing I've found, in the site header, in the CMS (not the backend PHP code), place your unique script tracking code somewhere in an HTML block:

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'YOUR ANALYTICS TRACKING CODE', 'auto');
ga('send', 'pageview');


And it will report for each page accessed within the site automatically.