Tracking Code not working

Permalink 1 user found helpful
Hi,
I need to add Google analytics tracking code to the site and have done so in the sitewide settings area, however it's not working and isn't included in the code at all.

I've looked at other threads which say to add this:
<?php Loader::element('footer_required'); ?>

But I've already got that in there.

Anyone got any ideas?
https://www.countrysidenurseries.co.uk/...

Thanks

 
Mnkras replied on at Permalink Reply
Mnkras
you put that in your theme right, not in a controller or anything...

do you have the security wall addon installed?
lou28 replied on at Permalink Reply
Yep I've put that in the footer.php in the elements folder. here it is in context:

</div>
<?php  Loader::element('footer_required'); ?>
</body>
</html>


I haven't added a security wall addon to my knowledge no.
Mnkras replied on at Permalink Best Answer Reply
Mnkras
after the Loader::Element('footer_required'); (inside the php tags)

can you try putting

echo 'Testing';


and see if that shows up on your site. if its not then the footer isn't being included in the theme.
lou28 replied on at Permalink Reply
Thanks for this... after I realised it wasn't calling the footer I looked at the default page where it calls the footer and noticed the code was slightly wrong. All working fine now.
Thanks for steering me in the right direction!
apptech replied on at Permalink Reply
I had the same problem.

The Google Analytics code I pasted into the Tracking Code box in the Dashboard was not appearing.

It works now, bit I'm still not 100% sure if it was just a caching issue. Perhaps someone on the C5 dev team can explain.

This was how I worked through it: I removed the Google script from the Tracking Code box and replaced it with the word TEST inside comment tags. I then hard-coded the Analytics code into the footer and when I refreshed the page, I could see "TEST" in comments in the source. Then I deleted the hard-coded Analytics code from the footer and when I refreshed the page, the TEST comment vanished again.

My conclusion is that the Tracking Code doesn't get displayed if there's no other functional code or HTML in footer.php - I removed most of the code in footer.php (login links, etc) but I did not delete the defined('C5_EXECUTE') line or the 'footer_required' line.
jimd replied on at Permalink Reply
Hi there,

I have installed the Google Analytics tracking Code to our site but Google says it is not installed?

It was installed and I was getting results until Nov 6th but then it stopped?

Any ideas/suggestions/fixes would be great and greatly appreciated!!

Thanks in advance!

Jim

website:http://www.infieldjen.com