A large number of Magento store owners do not utilize all the wonderful eCommerce features that come built-in with Goggle Analytics. These features include eCommerce tracking, conversion and goal related tracking, demographics, visitor segmentation, and funnel visualization. All of them can help a business truly understand its market.
Ensuring that Google Analytics is set up correctly on your website can be daunting at a first glance due to the complex functionality it maintains. Since the change to Universal code, there is not much clear information written about it. Installing Google Analytics can be frustrating, particularly when you run into a problem or your website is not tracking the way it used to or the way you had planned it to. The three most common challenges for installation are also the three most critical components for any any Magento eCommerce business: tracking demographics, eCommerce statistics and conversions.
Below are five tips that will help you overcome these challenges, and ensure that your Google Analytics functionality is working to the best of its ability.
- Implementing the Universal Google Analytics Tracking Code
- Your Magento Google Analytics API Configuration
- Enabling Google Analytics Demographics
- Google Analytics eCommerce Tracking
- Google Analytics Conversion Tracking Utilizing Goals
1. Implementing the Universal Google Analytics Tracking Code
Make sure you have the new Universal Google Analytics tracking code implemented on your Magento website. Go to your Google Analytics ACCOUNT and PROPERTY columns, select the property you’re working with. Click Tracking Info > Tracking Code. Follow the directions and copy and paste this into your source code website. This task can be completed a number of ways. For example, you should copy and paste the code into your child theme under the /template/page/html/head.phtml file in Magento which is on every page of the website. Paste it immediately before the closing tag. It is important that the code is on every page of the website so the data can be tracked properly.
ga('create', 'UA-XXXXXXXX-X', 'auto');
View the source code of the Magento website to confirm the code has been added properly. You can do this using the Developer tools in your browser. You can use the Real Time tracking in Google Analytics to confirm the information is being tracked.
2. Your Magento Google Analytics API Configuration
Make sure you Google API is enabled and configured in your Magento admin.
You can find it under Configure > Sales > Google API
3. Enabling Google Analytics Demographics
Once you have the standard Universal Google Analytics tracking code implemented, you will not automatically see demographics load. To enable this you need to include the proper code and then verify it under the Audience > Demographics > Overview > tab.
Below are two important Google articles that describe this process. You need to use the universal code and include the bold part below in the tracking code:
To enable Display Advertising (Demographics) features for Universal Analytics, insert the bold line into your existing tracking code between the ‘create’ and ‘send’ commands, as seen in this example:
ga('create', 'UA-XXXXXX-XX', 'example.com');
If you still do not see this data loading make sure you check the Property settings in your Google Analytics account. Make sure demographics are enabled.
Once this is completed then you verify the code and the demographics should load.
4. Google Analytics eCommerce Tracking
General eCommerce tracking helps you see your marketing campaigns, coupons, affiliations, average sales, revenue and general conversions. This can go found under your Google Analytics > Conversions > Ecommerce > Overview > tab to see if Ecommerce is being tracked.
- Go to your Admin > eCommerce Settings and confirm the eCommerce tracking has been enabled.
- If this is not enabled it will probably not load this data. Also, remember to double check the steps above to successfully track this data.
5. Google Analytics Conversion Tracking Utilizing Goals
Conversion tracking can vary based on your needs and exact goals. This is just one example to get you started with Goals and Conversion tracking.
- Check the tracking code is correct and implemented properly
- To get the tracking code, log onto Google Analytics.
- From the ACCOUNT and PROPERTY columns, select the property you’re working with. Click Tracking Info > Tracking Code.
- Conversions will not be tracked if the proper code is not added to the success page once someone places an order.
- Generally, adding the tracking code to the Magento HTML Head through Magento’s configuration (Configuration > Web > HTML Head) should be enough. If for whatever reason it doesn’t seem to be tracking on the success page (sometimes a theme or extension will overwrite parts of Magento’s default functionality), then you might have to add the code in manually.
- To do this, using your FTP client, navigate to /app/design/frontend/template/checkout/success.phtml
- Open that file in an editor and add the Google Analytics tracking code to the very bottom of the file. Save it, and reupload it.
- Confirm your goals are configured properly. Note are the urls correct. If the urls do not match the conversions will not work.
- A good way to test this is to go under Real Time > Conversions and then go through the process of checking out.
- You should see your goals loading properly and the active users updating through each goal.
- If you do not see a particular Goal showing up then it is not configured properly. Go back to your Goals and check them. Purchase Made, Checkout Start & Confirmation
- Goals – Go to Admin > Goals
- Check you have the proper URLs that match your website and Verify the Goal
- Make sure the Destination is set to the final success page and to start the goal on the Shipping part of the checkout.
- Once everything looks good. Go through the checkout process or wait for an order to confirm the Conversions are being tracked!
After following tips in Steps 1 – 5 you should start to feel more comfortable with Google Analytics. These tips can help you utilize Google Analytics to maximize your marketing, SEO, and conversions on your Magento website through tracking your customer statistics. For additional Magento eCommerce tips, or if you have specific questions, please contact us today to make your Magento eCommerce website a success!