I noticed that when I switched to the Newsmag theme, my Google analytics stopped working. More specifically, it seems to be still tracking the page views and traffic, but my bounce rate has dropped to zero. While I’d love to believe that my bounce rate is zero, I doubt there’s a single site on the web with a legitimate bounce rate of zero.
I’ve got my Google analytics tracking code pasted into the corresponding space under ‘Analytics’ in the Theme Panel, so I don’t really understand why it’s not tracking my bounce rate and such now. How do I fix this?
Hi,
Check the browser console to see if you have any javascript errors, they appear in red – http://screencast.com/t/wfLNSiRpAdH
Analytics uses javascript and any js errors may break/alter it’s data retrieval process.
If you find errors try to disable all plugins except for Visual Composer and check if the errors are still there. If they are gone enable the rest of the plugins one by one until you find the one which causes this issue.
Once you find it check it’s settings or look for an alternative.
If you don’t find any errors please send us an email at contact@tagdiv.com , include a link to this conversation and provide wp-admin access so we can take a look.
Thank you!
@suport001 How do you check the browser console? I use Chrome as my browser and have very minimal coding experience although I tend to be pretty good at figuring things out and following instruction.
@neotrope It actually does show an error. It says “Uncaught SyntaxError: Unexpected token”. Is this an error that might be fixed by what @suport001 told me to do? I guess I’ll go ahead and disable the plugins and then re-enable them one by one to see if there’s one that’s causing this just in case. Hopefully that fixes this as it’s really annoying.
So I figured out what that error was. It’s the “Subscriptions” module of the Jetpack plugin. Here’s the thing: I really, really, really want to keep the “Subscriptions” module active. Even if I use nothing else in Jetpack — and I really don’t need any other modules — I want to keep the “Subscriptions” module because it’s been the only way that I can include a way for visitors to subscribe to my site on the main page. If I use anything else, it won’t consolidate my subscribers and allow my to use that single module/widget for all subscription boxes. I haven’t yet found an option for this that’s easier and keeps subscribers all in one place that’s not some third-party service. I don’t want to use MailChimp or Constant Contact or any of those services; I just wanted to use what was built into my WordPress and keep my subscribers in one place so it would be more seamless.
Here’s what I did. I wanted to use the Jetpack shortcode for the subscribe form/box on the main page, which I used the Visual Composer to create. However, I struggled to do this because the Jetpack widgets weren’t available to me when I was using the Visual Composer for my main page, so I added a custom text/HTML block in the Visual Composer, and then typed in the Jetpack subscription shortcode in order to include that little subscription form on my main page. (My website is http://www.daneoleary.com if you want to see this for yourself.) I don’t really understand why using that Jetpack subscription shortcode on my main page that I created with Visual Composer is preventing Google Analytics from working correctly. The home page is the only place where I’ve even used it in that way and I noticed that the error I mentioned above doesn’t appear on any pages other than the home page.
Is there a way to work around this?
Sadly, Jetpack doesn’t always play well with other stuff. Often an update is needed by them to address stuff like this since all the JP stuff is loading off the Automattic server.
Likely they have some element that is causing a conflict.
You might try doing alternate placement of the GA code; e.g., not using theme panel, putting in the header or footer manually, or using a different plugin, or the Yoast option, or whatever.
I’m sure somebody else using both JP and GA might have a solution, but I don’t use JP and instead find other plugins or code so I don’t have to suffer the invevitable bugs with JP.
Hi @DaneOLeary
Try to deactivate all plugins, leave just Visual Composer and Jetpack plugin with Subscriptions module active, clear all caches and check if the problem is still there. If the problem persist try to use a different plugin from subscriptions, for example mailchimp: https://wordpress.org/plugins/mailchimp-for-wp/
Thanks!
Hello again @andrei_luca
I was messing around with everything trying to figure out a way to make that error go away and it looks like I was able to do it. When I used the Jetpack shortcode to put that subscription box on my main page using a ‘WP Text’ block in the Visual Composer, I was getting that error in the browser console. So what I did was switch that ‘WP Text’ block to just a standard text block and put the shortcode in there. Once I made that change, the error no longer appeared.
I also noticed that I had my Google tracking code on my website like three different ways: I’d put it in the appropriate space in the Newsmag Theme Panel, in a Google Analytics plugin, and then there was a third plugin too. I’ve removed the third plugin, but I like the stats that the Google Analytics plugin gives me on my Dashboard so I’d prefer not to lose it. Will having my tracking code on my site twice prevent it from working correctly?
Also, now that there are no errors in the browser console, does that mean that my Google Analytics will start working correctly? How can I tell if it’s working? It took like 2 weeks for my bounce rate to drop down to 0.5%, which is when I knew something wasn’t right. Will I have to wait 2 weeks to see if it goes back up to a more reasonable number, or is there another way to see if my analytics are working again?
Really appreciate everyone’s help with this.
Hi,
You should try to add the code only once, if you placed it in a plugin don’t add it on Theme Panel -> Analytics.
Then check the page source to see if the code was really added by that plugin – http://screencast.com/t/ZguwrGYpr7QS
Unfortunately you cannot immediately see the results, you have to wait.
Thank you!
