Google Analytics Not Tracking

nsitedesigns
nsitedesigns used Ask the Experts™
on
I setup google analytics for wordpress site and installed Google Analytics Dashboard for WP plugin.  

Part of site is https and one page is http.  It's a long story.....

Anyways,  I put the setting in analytics to http figuring it would capture ALL activity.  To test, I had people go to my site and click around a bit.  The real time setting (which was setup yesterday) still show zero activity.  I then went in and changed the setting on the Tracking Options to https: and I clicked around a bit.  Still shows no real time activity.  

I am using the Google Analytics Dashboard for WP plugin.  It says there are no errors.  

Not sure what is wrong....
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Don't talk to me.
Commented:
Did you verify the tracking code appears in view-source?

Are all users logged in when testing?

Author

Commented:
I see this TWICE in the code.  Not sure why it is there twice since I used the plugin to set it up.  The "UA" number is different than the UA number on my google analytics account.  Weird!  I deleted some of the numbers on the UA code below for security.

<script>
  (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-67....', 'auto');
  ga('send', 'pageview');

</script><script>
  (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-67......', 'auto');
  ga('send', 'pageview');

</script>

Open in new window

Author

Commented:
If i uninstall the plugin, will that remove both instances cited above?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Jason C. LevineDon't talk to me.
Commented:
The "UA" number is different than the UA number on my google analytics account.

Well, that's not good.

If i uninstall the plugin, will that remove both instances cited above?

Don't know, I don't use that plugin because I don't care enough about the stats to waste bandwidth embedding them in the dashboard.  For simple embedding of GA code via plugin, I use:

https://wordpress.org/plugins/google-analytics-for-wordpress/

If I need to play games, I manually insert the tracking the code via functions.php and hooks.

Author

Commented:
the nice thing about the plugin is that i can view stats directly in wordpress.  I don't have to login to google analytics to view.  this plugin was recommended by google on their analytics site so i figured it did have some value. i will remove it and then reinstall. hopefully that will take away all UA references and I can begin again.  will let you know what happens.

Author

Commented:
crap. ok.  i deleted plugin but the scrip is still there.  not sure how to remove. any suggestions.
Jason C. LevineDon't talk to me.
Commented:
Purge all caches, see if that removes the code.  If not, you will need to start going through theme files to see what is setting it.

Author

Commented:
Ok. I also have a message into theme maker to see if they can shed any light on this.
Jason C. LevineDon't talk to me.
Commented:
Several themes and frameworks have a place to enter javascript for inclusion on all objects, so check the settings page.  You can also go through the wp-options table and search for any GA code there.  If you find it in the table, null out the entry.
Lucas BishopMarketing Technologist
Commented:
Part of site is https and one page is http.  It's a long story.....
In your GA account:
Admin > Property Settings > Default URL

Open in new window

~~ is this set to https or http?

The "UA" number is different than the UA number on my google analytics account.
Maybe the theme developer accidentally left their GA code hard-coded in the template?

Within the theme's folder do a search for files containing the text "UA-67...."
Jason C. LevineDon't talk to me.

Commented:
accidentally

May not have been accidental :)

Author

Commented:
Theme comes from studio press.  will check
Jason C. LevineDon't talk to me.

Commented:
Okay, check the Genesis | Settings area in the backend.  There will be two boxes for scripts: one for top of the page, one for bottom.

Author

Commented:
I removed the script from the box and all is good.  Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial