Essential Google Analytics

Essential Google Analytics

Bas van Kollenburg發表於
Number of replies: 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

評比平均分數: -
In reply to 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

評比平均分數:Useful (1)
In reply to Julian Ridden

Re: Essential Google Analytics

Bas van Kollenburg發表於

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

In reply to 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

In reply to 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 -->

In reply to 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

In reply to 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

In reply to Julian Ridden

Re: Essential Google Analytics

Bas van Kollenburg發表於

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

solved

In reply to 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