• 0

Google Analytics Not Working from Custom CSS


Question

Posted · Report post

I had Google Analytics working on a site which I just completely redid using DMS.  I took the site live last Monday night and forgot to put in the tracking code for the first few days and then last Friday put it in (added to the Custom CSS box) and checked the source code for the home page and it was showing in there.

 

Today there is still no data showing up in Analytics for the past week including today and I contacted tech support for Analytics and the rep said the source code was not showing the Analytics tracking code.  I then realized that I was logged in and he was not so I logged out of WP and rechecked the source code for the page and when I checked it this time it was not showing up.

 

I checked further and noticed that I would insert the code into Custom CSS and then save it and Publish and when I logged out and back in it wouldn't be there but there would be something starting with 'Minify'.  My minify plugin was already deactivated so I deactivated my auto-optimize plugin and then the Analytics code would stay correct in the Custom CSS when I logged out and in again.  But even after this it still wouldn't show in page source code when I logged out.  I even cleared the cache to make sure that wasn't the issue but it didn't fix this problem.

 

I'm using DMS version 1.1.5 with the child theme version 1.0.1 and WP version 3.8.1.  The site is http://clearwaterbeachcondosforsale.com.  Would love to get some help in sorting this out.  Analytics has people to help with getting the code working but I know from past experience that when the issue is theme-related it is better to get help from the theme people because either the Analytics people will say they can't help or they will suggest something that may cause other problems.

 

Any suggestions?

 

Thanks,

Ron

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi Ron

 

Looking at the source code currently it's showing a previously cached version by the plugin wp super cache, not the live site. If you clear the cache file inside the wp super cache plugin, then disable it completely. Then go back back and check the analytic code is in the header scripts box, not the custom css box. It needs to go into the header scripts box to be seen. Save, check the code is correct and present. Then go to google and check the code is showing as installed/tracking.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hii James,

 

Thanks for figuring that out.  For some reason I was so used to using the custom css box that I completely overlooked that there was a 'header scripts' box.  Kind of looking for your keys and you find out after 10 mins they've been in your hand all the time.

 

Did what you said exactly and it is now showing up and working.  Thanks so much!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for informing us the issue has been resolved.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now