Читать книгу Google Analytics Integrations - Waisberg Daniel - Страница 5
Chapter 1
Implementation Best Practices
Implementing and Customizing Your Code
ОглавлениеIf you are implementing Google Analytics for the first time, you will see a wizard that will guide you to retrieving the appropriate tracking code to use, right after creating an account. The first choice: what would you like to track, a website or a mobile app? If you choose a website, you will get a JavaScript code to implement on it; if you choose an app, you will get links to download either the Android or iOS SDKs.
If you miss the previous step or would like to find your tracking info at a later stage, you can find this page by logging into Google Analytics and clicking on Admin on the top of any page. This will lead you to the Administration panel where you can find an item named Tracking Info.
While implementing the default code on your website or app will provide you with important information about customer behavior, other code customizations might be required to accommodate your business needs. In the next section, I describe the customizations that I believe to be the most important; for a comprehensive and detailed description of all customizations available, visit http://goo.gl/t1Td5T.
Implementing Google Analytics Through Google Tag Manager
If you are an experienced analyst/developer/marketer, you are probably asking yourself, “When is he going to start talking about Google Tag Manager?” A great question! In this chapter I focus my attention on the Google Analytics methods that should be used when enhancing your implementation, regardless of how you choose to actually implement them.
As you might already be aware, Google Tag Manager is a powerful and scalable way to organize your Google Analytics (and other tools) implementations. It will make updates easier and cleaner, and it will transform you into a hero. Here are a few resources you should consider when implementing Google Analytics through Google Tag Manager:
● The official Google Tag Manager Help Center: http://goo.gl/1uXK90
● The official Google Tag Manager Developer documents: http://goo.gl/CPTYH6
● Google Tag Manager Step-By-Step Guide (Web): http://goo.gl/lBiX6t
● Guide to Google Tag Manager for Mobile Apps: http://goo.gl/ib3LL7
Cross Domain Tracking
If you would like to measure multiple websites that are linked together within a single Google Analytics property, it is important to adjust the code with Cross Domain Tracking (tracking behavior across subdomains does not require additional configuration). Failing to take into account multiple domains when implementing Google Analytics can significantly decrease data accuracy. Common cases are ecommerce carts, which are sometimes hosted on different domains; if the tracking code is not set up correctly in such instances, you might see a large number of direct or self-referral sessions ending on a transaction.
In order to understand Cross Domain Tracking thoroughly and grab the necessary codes for implementation, I recommend reading through both the Developer documentation at http://goo.gl/5JvxJ1 and the Help Center at http://goo.gl/TJ0Wfp.
Enhanced Ecommerce
If your website or app offers merchandise or another type of ecommerce transaction, it is critical to implement the Google Analytics Enhanced Ecommerce functionality so that you can understand your customer journey better. This feature will enable you to have a deeper understanding of shopping behavior, campaign ROI, customer lifetime value, and other important information.
For a business and technical overview of the Enhanced Ecommerce feature, read http://goo.gl/th9Roy.
Custom Dimensions
Creating audience segments is one of the most important techniques when trying to understand and optimize customer behavior; it allows you to make your website or app more relevant to different groups of users. Google Analytics provides a powerful segmentation capability by default, using a multitude of metric and dimension combinations.
In addition to the default segments, Custom Dimensions allow you to add attributes of a user, session, or action when collecting data. For example, a business that sells different types of memberships should be able to understand how each member type behaves; a large publisher should be able to understand how each of their authors is performing; and a travel website should be able to know which kind of hotel their returning customers like the most.
You will learn more about Google Analytics Segments and Custom Reports throughout the book. However, the subject is especially important when it comes to Custom Dimensions, as those dimensions do not appear in any of the standard reports. Therefore, the best ways to analyze behavior based on Custom Dimensions are as follows:
1. Create a segment: The Segment builder enables you to create a segment that includes or excludes the behavior of specific users. For example, you might want to exclude from your reports all your existing clients (defined through a Custom Dimension) using a segment. This would be wise when analyzing customer acquisition efforts. You might also want to include in your reports only users who are part of your loyalty program (defined through a Custom Dimension) to analyze what type of content they are most interested in. Those are only two examples; to learn more about creating segments, visit http://goo.gl/6gbC2k.
2. Build a Custom Report: Google Analytics allows its users to create Custom Reports using the metrics and dimensions available in the tool to tailor their reports to their business needs. This functionality can be used to build reports including Custom Dimensions and acquisition behavior, or conversion metrics that can help you understand your users' behavior. To learn more about Custom Reports, visit http://goo.gl/e0ADkr.
For a detailed explanation on why and how to use Custom Dimensions, read http://goo.gl/fvhL8L.
Download Clicks
Different websites have different goals. You learned previously about a way to measure ecommerce transactions, and you will learn shortly about a way to measure advertising revenue through the AdSense integration, but some websites will have downloads as their main goal. Google Analytics will not measure clicks on download links by default, so it is critical to add a customized code to your website if you are encouraging people to download any type of file. Here is a guide explaining how to do it: http://goo.gl/uUm4rq.
Advanced Content Tracking
Every website owner should be able to understand how its users consume content. However, sometimes users behave in ways that cannot be measured by a default implementation. For example, when someone lands on a long article, reads through the whole piece, and then leaves the website, from a Google Analytics perspective, this person viewed just one page and didn't interact with the content. This is a problem when it comes to content publishers.
With that in mind, Justin Cutroni, Analytics Evangelist at Google, developed a script that sends events to Google Analytics whenever a user scrolls down a page. In addition, the script uses Custom Dimensions to categorize users into “scanners,” users who scroll to the bottom of the content in less than 60 seconds, and “readers,” users who take more than 60 seconds to reach the bottom of the content. This solution is excellent for measuring users' content consumption patterns. Read more at http://goo.gl/21eIiO.
Troubleshooting Code Implementation
If you manage a website, it is critical to keep an eye open at all times to make sure your implementation is okay, especially when you update the website code. The following list of tools created by the Google Analytics team will help you with this task:
● Diagnostics (in-product feature): When you log in to your Google Analytics account and select a view, you will notice a bell icon in the upper-right corner of your page. You will also notice that sometimes there will be a notification number there. If you click on the bell, you will find a list of customized notifications for your code implementation and set up. Make sure you read through them and fix the issues. Learn more at http://goo.gl/8NC2Y4.
● Real Time (in-product feature): Google Analytics provides Real Time data for website behavior, where you can see what is happening right now on your website or app. This is very useful for website debugging, since you can make changes in the code and find out how they are affecting the data in real time.
● Tag Assistant (Chrome extension): This extension allows you to check your Google Analytics tag (and other Google tags) while browsing the website. It is a handy tool to check and troubleshoot implementations quickly. Download it from the Chrome Store at http://goo.gl/P1LstJ.
● Google Analytics Debugger (Chrome Extension): This extension provides more detailed and technical data (as compared to the extension) about what is being sent from a page to Google Analytics. Download it from the Chrome Store at http://goo.gl/yn9dHj.