Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Google Analytics missing after upgrade to 1.7
 
nigelt
Jr. Member
 
Total Posts:  17
Joined:  2009-02-13
Buckinghamshire United Kingdom
 

I’ve just noticed that since upgrading to 1.7 google has stopped indexing my sites.
I’ve checked and the analytics number IA-2342 etc is still set in configuration and enabled, but when I view the source of my site, there is not google analytics code there at all.
Does anyone know where its generated from ?
Thanks
Nige

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roeltje
Jr. Member
 
Total Posts:  19
Joined:  2009-01-19
Waalwijk, Netherlands
 

Do you use Fooman Googleanalyticsplus ?

Got the same error while using that plugin… removing it fixed the analytics tag.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nigelt
Jr. Member
 
Total Posts:  17
Joined:  2009-02-13
Buckinghamshire United Kingdom
 

Hi
No, I dont. Its just the bog standard magento offering.
I’ve just installed a fresh test version of magento and its fine there, so I think I’ve bodged the upgrade…
Any thoughts or ideas how to solve would be appreciated.
Nige

 
Magento Community Magento Community
Magento Community
Magento Community
 
motorecycler
Member
 
Total Posts:  49
Joined:  2009-09-10
 

I also noticed my analytics are gone. Have you figured anything out yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
motorecycler
Member
 
Total Posts:  49
Joined:  2009-09-10
 

Does anyone have GA working with 1.7?  Ever since i upgraded from 1.6.2.0 to 1.7.0.0 GA shows no traffic or anything.  It is enabled on my stores backend, with the correct account number.  If anyone has any suggestions i would greatly appreciate it.
thanks!
Dave

 
Magento Community Magento Community
Magento Community
Magento Community
 
dustinboling
Jr. Member
 
Total Posts:  3
Joined:  2010-08-02
 

Same issue here, we just upgraded Magento to 1.7.0. GA is enabled in Google API area of System > Configuration, but the code is not appearing on the site.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Astrid
Jr. Member
 
Total Posts:  4
Joined:  2009-03-30
 

Same problem here. Anyone found a solution yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
geoff_ebiz
Jr. Member
 
Total Posts:  1
Joined:  2011-11-22
 

Hi, I identified that the problem was down to the skin. I have just been working on this and found that removing the googleanalytics.xml file from my layout folder worked. Have no idea why though smile

So just renamed above file to googleanalytics.xml.bkp then refreshed cache and hey presto, analytics appeared.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Julio_Farra
Jr. Member
 
Total Posts:  4
Joined:  2010-01-18
 

In my case the solution above not work. I think because my googleanalytics.xml (inside the layout folder in my template) as the reference name like \"before_body_end\" and the base googleanalytics.xml (which is used when you erase your .xml file from your template) as the reference name \"after_body_start\".

So, what I did is add to my xml a final tag which is present in the new xml from 1.7 version. The tag is template=\"googleanalytics/ga.phtml\"

The final code is

<layout version=\"0.1.0\">

<!--
Default 
layoutloads most of the pages
-->

    <default>
        <!-- 
Mage_GoogleAnalytics -->
        <
reference name=\"before_body_end\">
            <
block type=\"googleanalytics/ga\" name=\"google_analytics\" as=\"google_analytics\" template=\"googleanalytics/ga.phtml\" />
        </
reference>
    </default>
</
layout>

EDIT: the forum adds a lot of \ before any ‘’, those ‘\’ do not must be used inside the xml file

Good Luck.
Julio.

Sorry for my bag english, I am not a native speaker.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Astrid
Jr. Member
 
Total Posts:  4
Joined:  2009-03-30
 

Thanks a lot Julio! Your English may not be great, but your solution is. Works like a charm. I’m very relieved you found it wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
gediweb
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-08-29
 

Julio’s fix worked perfectly for me! Thanks! I’m glad I found this post.

 
Magento Community Magento Community
Magento Community
Magento Community
 
snaveydavey
Jr. Member
 
Total Posts:  6
Joined:  2008-11-23
 

Hi All - I’m having issues with GA ecommerce data in 1.7.0.2- Could some whose ecommerce data is correctly reporting post the source code for their order confirmation page?

googleanalyitcs.xml is correctly referencing template file - if fact, even with clean 1.7.0.2 install, I still see no ecommerce data on checkout confirmation page - just the:

_gaq.push([’_setAccount’, ‘UA-accnt_number’]);
_gaq.push([’_trackPageview’]);

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
RoyalHost
Jr. Member
 
Total Posts:  12
Joined:  2010-09-09
30.178135, -93.262491
 

Thank you julio, your solution work perfect. That solve my problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rickhuisken
Jr. Member
 
Total Posts:  2
Joined:  2011-12-19
 

Same problem with me, update to 1.7.0.2 and analytics data is missing. I’ve searched everywhere but no info to be found. I can’t believe not more people have this problem.
Any help would be great, in the backend everything has been entered but on the pages the acountID doesn’t show.

This is what shows when I look in the pagesource:

<!-- BEGIN GOOGLE ANALYTICS CODE -->
<script type="text/javascript">
//<![CDATA[
(function() {
var ga = document.createElement(’script’); ga.type = ‘text/javascript’; ga.async = true;ga.src = ‘http://www.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(’script’)[0]; s.parentNode.insertBefore(ga, s);
})();
var _gaq = _gaq || [];

_gaq.push(["_setAccount", “"], ["_trackPageview",""]);

if(Ajax.Responders){
Ajax.Responders.register({
onComplete: function(response){
if(!response.url.include("progress")){
if(response.url.include("saveOrder")){
_gaq.push(["_trackPageview", “"+ “/opc-review-placeOrderClicked"]);
}else if(accordion.currentSection){
_gaq.push(["_trackPageview", “/"+ accordion.currentSection]);
}
}
}
});
}

//]]>
</script>

<!-- END GOOGLE ANALYTICS CODE -->

Any help is much appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
rickhuisken
Jr. Member
 
Total Posts:  2
Joined:  2011-12-19
 

I found out that the problem was with Googleanalyticsplus from Fooman, uninstalled it and the code is back.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kitesurfa
Member
 
Avatar
Total Posts:  35
Joined:  2010-12-01
 

Julios fixed worked for me, just do a search and replace on all instances of \” and replace with “

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2