Analytics
2K members online now
2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Changed my theme and my google analytics is not showing any stats.

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello i changed my theme in wordpress  and google analytics not showing any stats from yesterday.

 

I checked my page in developer tools and found this code

 

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-0000000-0']);
 
 
Now i am not able to understand how to fix this. 
I am using wordpress and can any one guide me how to fix this? I am using genesis theme and i added code to template before the head tag but its not working so can some one guide me?
 
Thanks
2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Chaithanya K
February 2016

Re: Changed my theme and my google analytics is not showing any stats.

Top Contributor
# 36
Top Contributor
Please delete the filters. They may block all your traffic if not set up correctly.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Changed my theme and my google analytics is not showing any stats.

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭
Hi,

You should add your GA code in wordpress template, on header.php file before the head tag.
Already you should give your acount id and also set a pageview hit.
Like so;

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXX-Y']); (Here should be your GA ID)
And after this line you should set pageview hit.
_gaq.push(['_trackPageview']);


The following usage is typical:

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);

Re: Changed my theme and my google analytics is not showing any stats.

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Scheref i added my tracking code below the head and its not working. I added Tracking code in the morning and send test traffic and found no users on the site. Can you guide me how to fix the issue please?

Re: Changed my theme and my google analytics is not showing any stats.

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
seems your analytic code is got deleted due to change of Theme.

You need to update the Theme with your UA code.

Usually changing theme cause the change in Header Code which come along with the Theme file.

You also get option to update the Google Analytics code at Appearance >> Theme Option >>

Also if you specify me which theme you have updated than I can give more detail to you.

Re: Changed my theme and my google analytics is not showing any stats.

Follower ✭ ✭ ✭
# 5
Follower ✭ ✭ ✭
Can you share with me your website?

Re: Changed my theme and my google analytics is not showing any stats.

Rising Star
# 6
Rising Star
Hi, I would suggest to use Google Tag Manager to add GA code to the website as it will give you way more opportunities which you can take advantage from.
You can refer to this quick article https://support.google.com/analytics/answer/6163791?hl=en
Cheers, Alexey
UAWC Agency
Did you find any helpful responses or answers to your query ? If yes, please mark it as the ‘Best Answer.’

Re: Changed my theme and my google analytics is not showing any stats.

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Re: Changed my theme and my google analytics is not showing any stats.

[ Edited ]
Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

What exactly happened was different. I wanted to add a code to my theme template and updated the file and my site showed me 500 error and i am not able to disable it. So i logged in to cpanel and deleted that theme which i am using and logged in back again and changed my theme. I am using genesis theme now. Enterprise pro theme is the child theme.

Re: Changed my theme and my google analytics is not showing any stats.

Follower ✭ ✭ ✭
# 9
Follower ✭ ✭ ✭
Hi i checked your website. You should give GA ID in your GA code.
As you can see below your GA ID is UA_0000000-0. You should write here your GA ID.
For example
_gaq.push(['_setAccount', 'UA-1234567-1']);

Your GA code in your page:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-0000000-0']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src=('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

Re: Changed my theme and my google analytics is not showing any stats.

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭
where is it located? Can you help me where it could be located i tried in different areas but that code is no where.