Google Analytics Deploy custom dimensions and metricsAugust 12, 2013 Abbo 7 Comments
To use Google Analytics's custom dimensions and metrics, we first have to recognize the concept of dimensions and metrics. In simple terms: dimensions are the angle of our perception of things, and indicators are the way we measure things. From the database point of view, dimensions and indicators are fields, the dimensions are often string type, discontinuous, and indicators are often numeric, can be continuous.
Contents
- 1 Custom dimensions and metrics what questions can I answer?
- 2 Custom dimensions and metrics in Google analytics
- 3 Sending dimensions and metrics data
What questions can I answer with custom dimensions and metrics?
- Distinguish between member and non-member visits
- Distinguish between logged-in users and non-logged users
- Order number and order Amount as indicator
- ......
custom dimensions and metrics in Google analytics
It is useful to collect custom dimensions and metrics from Google Analytics. We can use custom dimensions and metrics to subdivide and measure business data such as landing and non-logged users, author of the page, player level in the game, and so on. We can send the following data to build custom dimensions and metrics:
- Dimensions: Allow up to 20 (200 of the charge edition), String type
- Indicator: Up to 20 (200 in charge version), numeric type
Before using custom dimensions and metrics, we first need to configure custom dimensions and metrics in the background. In addition, we need to understand the scope of custom dimensions and the type and precision of custom indicators.
sending dimensions and metrics data
Click the dimension and metric data for the level, for example, to send a PV type data that contains a custom dimension:
1234 |
//第15个自定义维度为该值 ga( ‘send‘ , ‘pageview‘ , { ‘dimension15‘ : ‘My Custom Dimension‘ }); |
When we need it, we can send the data together with the dimension or metrics and events:
1234 |
//当点击事件时,第18个自定义指标增加8000,当然,该值也可以为小数 ga( ‘send‘ , ‘event‘ , ‘category‘ , ‘action‘ , { ‘metric18‘ : 8000 }); |
If you want to have all the behavior of the entire page (or the user access cycle, or even the entire user life cycle) belong to a dimension or metric, then we can do it through set dimensions or metrics:
12 |
//设置第5个自定义维度 ga( ‘set‘ , ‘dimension5‘ , ‘custom data‘ ); |
This realizes the custom dimension and the indicator statistics!
Custom Dimensions and metrics