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 2 of 2
Google Analytics missing after upgrade to 1.7
 
vishaal
Jr. Member
 
Total Posts:  2
Joined:  2012-03-01
 

Thanks a lot, Julios. It worked fine for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

Hey @Julio, by the way the \’s in your post, I noticed that the forums will add them if you mistype the captcha once and then enter it again.  You should be able to go in and remove them if you edit it - I’m sure they may confuse some people smile

Seems like there may be a couple different root causes here.  As for the people who are having issues specifically with 1.7.0.0, I wanted to mention that 1.7.0.1 lists a few specific fixes related to Google Analytics:

Fixed: Google Analytics e-commerce tracking not working
Fixed: Apostrophe in store name breaks Google Analytics tracking

Maybe try bumping to 1.7.0.1 real quick to see if that fixes it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
deainfo_elisa
Jr. Member
 
Total Posts:  1
Joined:  2011-09-30
 

I upgraded from 1.5.0.1 to 1.7.0.2.

I could not solve with Julio\’s solution.

What I could see after this upgrade is that:
1) in the googleanalytics.xml, template attribute was missing (it should have been template=\"googleanalytics/ga.phtml\”;
2) in my theme there was no googleanalytics/ga.phtml template folder and file, found in base theme instead.

Now it\’s working for me and here is what I\’ve done.

Fixing 1) is necessary, so specify the template attribute and value in the block tag (I left the reference name at after_body_start because google analytics tracking code has to be right after body start, following the most recent directives).

<layout version=\"0.1.0\">

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

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

Then if you need to customize your tracking code, I suggest you to copy googleanalytics/ga.phtml folder and file in your theme templates so that the file doesn\’t get overridden in future upgrades.

Hope it can help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
admin23
Jr. Member
 
Total Posts:  3
Joined:  2011-02-20
 
Julio Farra - 12 June 2012 06:32 PM

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.

Thank You Julian, still works like a charm!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
hollyscott
Jr. Member
 
Total Posts:  5
Joined:  2014-03-17
 

Hello,

If you are still searching a good solution, developpers of my team work on a great extension:

http://restaurant.web-cooking.net/seo/magento-google-universal-analytics.html

Some fonctionnalities:

- Use the new Google Universal Analytics with your Magento
- Choose between classical transaction system (transaction sent on order success page) or server-side transaction system (transaction sent when invoicing)
- By choosing server-side system, you will have an exact conversion rate!
- Server-side transaction system, using Google’s Measurement Protocol support, allow you to track real transactions (only paid orders!). But if you want, an option allow you to track all orders (with non-paid ones).
- Track following events : Customer Registration, Customer Login, Customer Logout, Add product to cart, Add coupon code, Share wishlist, -—Add product to wishlist, Newsletter subscription & unsubscription (Ask for more!)
- Track magento ajax sections in onepage checkout
- Manage dimensions : customer ID, customer Email, customer group ID, product SKU, product Name

Hope it can help you !

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