Google Analytics – How to Add Universal Analytics to Magento Store

google analytics

I set up a new Magento store, and a new analytics profile, and it asked if I wanted to use universal analytics or the original google analytics. After doing some checking, I found out I can create a new profile to track along side the original one so I have both now.

But the universal analytics profile isn't tracking anything and the original one is. It doesn't have traffic or goals. The tracking code is different. Is there a way to have Magento store to use universal analytics as well?

Best Answer

You have to add the new Universal Analytics code your your head.phtml file in your template. You can choose to disable the Google API or keep it active as well.

Your head.phtml file is located at: app/design/frontend/base/default/template/page/html/head.phtml

Just copy to your theme: app/design/frontend/your_theme/default/template/page/html/head.phtml

Add your analytics code before the if it shows otherwise at the end.

Here is a picture tutorial on how to do that: http://www.savethemage.com/blog/how-to-add-googles-universal-analytics-to-your-magento-store/

For tracking goals, you will have to set a new goal for your new profile.

Here is a tutorial on how to create the standard checkout goal funnel for Magento onepage abandonment rates: http://www.savethemage.com/blog/tracking-magento-onepage-abandonment-using-google-universal-analytics/

Related Topic