Essential Google Analytics

Essential Google Analytics

Bas van Kollenburg -
回帖数:8
I have entered the google analytics code in the theme, but Google Analytics can't find the code.
When i search into the code of the home page it looks fine i gues:
 
 

<!-- Start Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');


ga('create', 'UA-36432823-1',
{
'cookieDomain': 'www.eerste-hulp-online.nl',
'cookieExpires': '7200'
});
ga('send', 'pageview',
{
'page': 'Eerste Hulp Online',
'title': 'Eerste Hulp Online'
});
</script><!-- End Google Analytics -->

Or not??

thanks Bas

回复Bas van Kollenburg

Re: Essential Google Analytics

Julian Ridden -

It is probably causing conflicts as Essential already has that feature built in.

Remove your custom code first. Once done go to the Essential Theme settings and look for "Google Analytics". Now you just turn it on and enter in your Tracker ID. Simple as that.

Julian

回复Julian Ridden

Re: Essential Google Analytics

Bas van Kollenburg -

There is no custom code only the theme code. This is the theme code?

回复Bas van Kollenburg

Re: Essential Google Analytics

Julian Ridden -

That is what I am saying. No code needed, Just go to the theme settings in the admin block.

Julian

回复Julian Ridden

Re: Essential Google Analytics

Bas van Kollenburg -

Hy Julian,

This is the code the theme puts in. I just entered the Google ID and the theme created this code if you look at the source of the home page www.eerste-hulp-online.nl 

<!-- Start Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');


ga('create', 'UA-36432823-1', 
{
'cookieDomain': 'www.eerste-hulp-online.nl',
'cookieExpires': '7200'
});
ga('send', 'pageview', 
{
'page': 'Eerste Hulp Online',
'title': 'Eerste Hulp Online'
});
</script><!-- End Google Analytics -->

回复Julian Ridden

Re: Essential Google Analytics

Joseph Thibault -
Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像

Julian, two questions, one...just to I can be sure this was added to a later release of Essential (not available in all versions, is that correct)?

Two, any experience installing a newer version of Essential over an existing version? Will my marketing spots and slider save or is there a best practice to making the update of the theme only?

Cheers,

Joe

回复Joseph Thibault

Re: Essential Google Analytics

Julian Ridden -

Hey Joseph! Happy New Year.

1. Yup. have upgraded many Essential sites over the past few months with no issues.

2. Nope. All your settings will remain as they are. Just new options become available.

I try to ensure that Essential always has a clean upgrade path so you won't have to worry about these things 微笑

Julian

回复Julian Ridden

Re: Essential Google Analytics

Bas van Kollenburg -

Works now, don't ask me why ???

solved

回复Bas van Kollenburg

Re: Essential Google Analytics

Julian Ridden -

I'll claim "magic mechanic syndrome".

Its just like when your car squeaks for months but the moment you take it to the mechanic it magically stops. 微笑

Glad it works for you now.

Julian