Jump to content

Archived

This topic is now archived and is closed to further replies.

Ron

Google Analytics Not Working from Custom CSS

Recommended Posts

Ron+    2
Ron

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
James B    436
James B

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.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Ron+    2
Ron

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
Danny    1,327
Danny

Thanks for informing us the issue has been resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Queue-it
      By Queue-it+
      Hi,
      Where do I add the google experiment code for A/B testing so it would be above the original google analytics tracking code? 
      1. I've tried to put in the Pagelines Advanced settings
      2. and in the functions php file, but none of that worked. 
      I'm using a SEO yoast plugin to connect wordpress with GA and there are no settings to add the code before the original one.
       
       
    • Barnaby Skinner
      By Barnaby Skinner+
      Hey team,
      Really simple question: where would I add code to a specific page header? I can see in the settings I can add code to the global header, but can't see how to do it for a single specific page. It's related to facebook pixel tracking
      Cheers
    • navigador
      By navigador+
      If I'm using PL5 with PL5 Framework, what is the best way to include Google Analytics code?
       
      I know we have an Advanced section in Settings but that just allows for Header scripts. Should we also have a footer (after body) section to place scripts like GA.
       
    • dgsarnow
      By dgsarnow+
      I would like to add Google Analytics click tracking to the buttons on my site. I use the Pagelines shortcodes for the buttons. I was able to add the necessary header script easily using Custom Scripts.
       
      How can I insert the following onclick option to my buttons?
       
      onclick=”trackOutboundLink(‘http://www.domain.com’); return false;"          
×