11.07.2024
Home / Safety / Google Universal Analytics - use of custom dimensions and metrics. Custom Delivery Options Brand Report

Google Universal Analytics - use of custom dimensions and metrics. Custom Delivery Options Brand Report

Google AdWords. Gedds Brad's Comprehensive Guide

Custom Options

Custom Options

If you have multiple lists, you don't have to create a new one; It is permissible to use custom parameters (Fig. 10.16). With their help, you can create simple rules that tell Google to add users from existing lists A and B to the new list, or to include visitors from list A, but exclude those from list B.

Rice. 10.16. Example of custom parameters

I'll give you a quick rundown of the strategy, but first I'll explain why it's recommended to use custom parameters. I work directly with Google and conduct seminars on AdWords. When a user visits a seminar page, we place a cookie in their browser (listed as AdWordsSeminarVisits in their user preferences). When a user registers and purchases a ticket, we place another cookie on their browser called SeminarRegistrationComplete.

In our example, if a user visited the seminar page but did not convert, they are listed. If he went there and made a conversion, he is not included in the list. This allows us to selectively show ads to those who don't convert and avoid wasting money on those who have already purchased a ticket to our seminar. You can always see how many cookies are active in this moment, on the remarketing screen in the shared library (Figure 10.17).

Rice. 10.17. Remarketing and active lists cookies

From the book The Way of the Turtles. From amateurs to legendary traders by Kurtis Face

Parameters mixed up I suggest everyone who wants to start trading using any system to complete the following exercise. Take several system parameters and change their values ​​significantly, for example by 20 or 25 percent. Select a point located significantly

From the book Crisis Management author Babushkina Elena

23. Basic parameters for diagnosing bankruptcy Currently, a limited range of parameters is used to diagnose bankruptcy of enterprises.1. The current liquidity ratio reflects the total security of the enterprise with working capital and cash

From the book Real Estate. How to advertise it author Nazaikin Alexander

From the book 1C: Enterprise 8.0. Universal tutorial author Boyko Elvira Viktorovna

11.4. User settings In the 1C:Enterprise operating mode, the user can change the password. To do this, select “Service - User Settings”. To change your password, you must first enter the password and confirm it. Setting a new password will take effect

From the book Fundamentals of Enterprise Cybernetics by Forrester Jay

7. 7. Parameters (constants) Many numerical values ​​that describe the characteristics of the system are assumed to be constant, at least for the duration of the calculations during one playback of the model. Rice. 7–7. Parameters (constants). They are indicated by a line above or below the symbol

From the book Logistics of storage of goods: A practical guide author Volgin Vladislav Vasilievich

13.5.5. System parameters (constants) Now that we have completed the formulation of the equations that describe the behavior of the system and the equations that determine the initial conditions, we need to determine the numerical values ​​of the system parameters (values ​​that are constant throughout

From the book Logistics author Savenkova Tatyana Ivanovna

Parameters and equipment of the storage area Selecting the parameters of the storage area Before renting or designing a warehouse, it is necessary to solve the following tasks: – determination of the tasks of warehousing in the logistics chain for the movement of goods of the enterprise; – preparation of technical

From the book Marketing Management by Dixon Peter R.

7. 10. Basic parameters of warehouse zones A warehouse in a logistics system works to transform material (freight flows), changing in intensity and nature of incoming and outgoing flows, therefore the main indicators of warehouse capacity will directly depend

From the book 1C: Enterprise, version 8.0. Salary, personnel management author Boyko Elvira Viktorovna

Symbolic, intangible dimensions of quality management Some market segments buy quality as a symbol - quality products say a lot about their owner. Just as most people take pride in a job well done, we too take pride in owning

From the book Business Plan 100%. Effective business strategy and tactics by Rhonda Abrams

Parameters of a service quality management system Services vary in quality according to parameters such as speed, competence, courtesy, care, and customization of products (for example, shampoo and conditioner in hair salons). Correspondence,

From the book Google AdWords. Comprehensive Guide by Geddes Brad

17.4. User settings In the “1C: Enterprise” operating mode, the user can change the password. To do this, select “Service” - “User Settings”. To change your password, you must first enter the password and confirm it. Setting a new password will take effect

From the book More Than You Know. An unusual look at the world of finance by Mauboussin Michael

7.1. Basic assumptions and macroeconomic parameters of the project The activity of the enterprise is designed for an indefinitely long period, however, for the analysis of the investment project, a calculation horizon of 48 months was established. Conditional start date of the project –

From the author's book

Extra options and filters Click on the “Advanced Options and Filters” link to select the type of data you want to receive (Fig. 3.3). Rice. 3.3. Additional options and filtersYou can first select the country and language that suits your

From the author's book

Address Parameters: Basics In an address, the question mark acts as a separator and indicates where the query string begins. This is the part of the address that contains parameters, also called variables. The & character (ampersand) is used to

From the author's book

Other Dimensions of Adaptation Different types of fitness landscapes require not only different combinations of short and long jumps, but also different financial instruments and organizational structures. The traditional discounted cash flow method is well suited

From the author's book

Limited Options Over the past 130 years, the average P/E ratio has been slightly above 14, and the market has fluctuated consistently around this level over that period6. Isn't this sufficient proof that 14 is the mean?

4 User parameters

Review

Sometimes you may want to perform a check through an agent, which is not predefined in Zabbix. In this case, custom parameters will come to your aid.

You can write a command that will return the data you need and add this command as a user parameter to the agent configuration file (the "UserParameter" configuration parameter).

The custom parameter has the following syntax:

UserParameter=<ключ>,<команда>

As you can see, the custom parameter also contains a key. The key will be required when setting up the data item. Enter a key of your choice that can be easily referenced (it must be unique within the host). Restart the agent.

IN operating systems UNIX interpreter used command line /bin/sh. User parameters are subject to the waiting time for agent checks; If the timeout is exceeded, the process created using user parameters will be terminated.

See also:

Examples of simple user parameters

Simple command:

UserParameter=ping,echo 1

The agent will always return "1" for the item with the key "ping".

More complex example:

UserParameter=mysql.ping,mysqladmin -uroot ping|grep -c alive

The agent will return "1" if the MySQL server is available, "0" otherwise.

Flexible user options

Flexible user parameters allow parameters with a specified key. In this case, flexible user parameters can be the basis for creating multiple data items.

Flexible user parameters have the following syntax:

UserParameter=key[*],command

ParameterDescription
Key The unique key of the data item. [*] specifies that the key can accept parameters from parentheses. Parameters are specified when setting up a data item.
Team The command that is executed to obtain the value of the key.
For Flexible Custom Options only:
You can use position references $1...$9 to refer to the corresponding parameter in the data item key.
Zabbix parses the parameters enclosed in the data item key and replaces $1,...,$9 in the command accordingly.
$0 will be replaced by the original command (before expanding $0,...,$9) for execution.
References to positions are interpreted by the Zabbix agent regardless of whether they are enclosed in double (“”) or single (“”) quotes.
To use line item references without modification, specify a double dollar sign - for example, awk "(print $$2)". In this case, $$2 will actually become $2 when the command is executed.

References to positions starting with a $ sign are searched and replaced by the Zabbix agent only in the case of flexible user parameters. In the case of simple user parameters, such references are skipped and therefore escaping any $ signs is not required.

By default, some characters are not allowed in user settings. See the UnsafeUserParameters documentation for full list such symbols.

Example 1

A very simple example:

UserParameter=ping[*],echo $1

We can create an unlimited number of data items to monitor anything by specifying ping[anything] in this format.

    ping - will always return '0'

    ping - will always return 'aaa'

Example 2

Let's add more meaning!

UserParameter=mysql.ping[*],mysqladmin -u$1 -p$2 ping | grep -c alive

This parameter can be used to monitor database availability MySQL data. We can pass the username and password as parameters:

Mysql.ping

Example 3

Command Result

The output of the command is standard output along with standard error output.

​A text data element (character,​ log, or text information types) will not become unsupported if an error is output on standard output.

Custom parameters that return text (character, log, text info types) can return a space. If the result is incorrect, the data item will become unsupported.

Custom parameters and indicators allow you to send the necessary data to Google Analytics specifically for your tasks. For example, with their help you can upload such important indicators as or to Google Analytics. You can compare different segments with each other, for example, users who are logged in and not logged in, page authors, get values ​​when filling out fields in various forms, and the like, depending on the specifics of your site.

How do I add a custom dimension or metric?

  1. Open section "Administrator" and select the required resource.
  2. In column "Resource" click "Custom Definitions"> (or indicators).
  3. Click the button "+ Special parameter"(or indicator).
  4. Indicate its name.
  5. When adding a custom dimension or metric, select "Scope" from the following options: "Hit", "Session", "User", "Product"(more about scope).
  6. Also, when adding a custom indicator, select "Format Type" from the following options: "Integer", "Currency" or "Time".
  7. Check the box "Active" to start collecting data and adding a dimension or metric to your reports. If you do not want to activate the created setting, clear this check box.
  8. Click the button "Create".

Methods for sending to GA

Sending data via tracking code

// Send a custom parameter when viewing a page ga("send", "pageview", ( "dimension1": "My parameter" )); // Send a custom metric along with an event ga("send", "event", "category", "action", ( "metric1": 123 ));

Sending data via GTM

If Google Analytics is implemented on the site via GTM (which is recommended), then during tag activation, you can transfer custom parameters or metrics. To do this, go to « Additional settings» , specify the index and value.

Sending data via Measurement Protocol

A guide to using the Measurement Protocol is described in the article “”, in which the user’s Client ID is passed to the cd14 user parameter.

Restrictions

In each resource you can add 20 custom parameters and another 20 indicators.

You can't delete custom dimensions or metrics, but you can turn them off.

Case for bypassing restrictions of 20 parameters and indicators

There are tasks when you need to track the completion of a calculator or some form on a website with a large number of fields. It is not an option to create a separate parameter for each field, since you may run into a limit.

The way out of this situation is to create two parameters: the first for the names of the form fields, and the second for the values ​​​​entered in the fields.

Accordingly, we transfer the values ​​of the form fields to the “Calculator field - value”, and the field name itself to the “Calculator field - name”. And when, let’s say, we need to display all the values ​​of the “City” field, we simply set the filter for the special indicator “Calculator field - name” equal to the field name.

Custom dimensions and metrics are used in much the same way as the default ones, except that you create them yourself. Custom dimensions and metrics can help you collect data that Google Analytics doesn't automatically track.

Custom dimensions and metrics can be created and modified at the level resource V Google account Analytics, if you have permission to change them.

Creating a custom dimension or metric is a two-step process. First, create a custom dimension or metric for your property. Then change the tracking code. Follow the steps below in order.

Content

How to create custom parameters

  1. Open the Administrator section and go to the required resource.
  2. In column Resource click Custom Definitions > Custom Parameters.
  3. Click the button + Special parameter.
  4. Please indicate it Name.
    Choose a descriptive name so as not to confuse the new element with other parameters and indicators.
  5. Fill in the field Scope.
    The following options are available: Case, Session, User, Product." For more information about scope and using special parameters, read the developer guide.
  6. Check the box Active to start collecting data and adding the parameter to your reports. If you do not want to activate the created setting, clear this check box.
  7. Click the button Create.

How to create custom metrics

  1. Open the Administrator section and go to the required resource.
  2. In column Resource click Special definitions > Special indicators.
  3. Click the button + Special indicator.
  4. Specify Name.
    We recommend choosing a unique and informative name that will be convenient to work with.
  5. In the drop down menu Formatting type select the desired option: Integer, Currency or Time.
    The integer can be anything. The currency corresponds to the one specified in the presentation settings (US dollar, yen, etc.), and the amount is indicated as a decimal fraction. The time is indicated in seconds, but in reports it is displayed in the format hh:mm:ss.
  6. Check the box Active to start collecting data and adding the metric to your reports. Clear the check box if you want the metric you create to remain inactive.
  7. Click the button Create.

Changing the tracking code

After you create a custom dimension or metric for a resource you also need to change the tracking code. This should be done by a qualified developer. Instructions can be found in the appropriate developer guide.

How to include non-standard data in reports

Requirements

Custom dimensions and metrics are only available in properties that use Universal Analytics or have at least one view for the application. Custom dimensions and metrics are supported in the Analytics SDK for Android and iOS versions 2.x and higher, as well as in the analytics.js library and the Measurement Protocol platform.

To use custom dimensions and metrics, you must set up an Analytics account and tracking code.

Restrictions

Each resource has 20 indexes available for personalized parameters and another 20 for indicators. For Analytics Premium accounts, these limits are increased to 200 each.

You can't remove a custom setting, but you can turn it off. It is not recommended to reuse custom parameters. After changing the name, scope, and value of a custom parameter, the report may contain both the old version and the new one. As a result, the data will be inaccurate and it will be impossible to filter it.

Working with custom dimensions and metrics

Settings

First, you need to define the values ​​of the custom dimensions and metrics in your Analytics resource. Each resource can have up to 20 special parameters and the same number of special indicators.

You need to specify the name and other properties of a special parameter or indicator with a specific number. For special parameters, the following settings are specified:

The following settings are specified for special indicators:

  • Name– the special indicator will appear in reports under this name.
  • Type– determines how the value of a special indicator will be displayed in reports.
  • Minimum/maximum value– minimum and maximum values ​​that will be processed and entered into reports.
  • Active– indicates whether the value of the special indicator will be processed. Inactive custom measures will appear in reports, but their values ​​will not be processed.

You can create custom dimensions and metrics in the Analytics interface.

Do not change the names and scope of special parameters and indicators unless absolutely necessary. .

Data collection

Values ​​for custom dimensions and metrics are sent to Analytics as number-value pairs. This uses the number you specified for the custom dimension or metric during .

Unlike other data, custom dimensions and metrics are sent to Analytics along with other hits (page views, events, transactions). Therefore, their values ​​must be set before calling the tracking code.

For example, this is what the code that sets the value of a special parameter might look like:

Ga("create", "UA-XXXX-Y", "auto"); // Selecting a value for a special parameter with index 1. ga("set", "cd1", "Level 1"); // Passing the value of a special parameter with a request - page view. ga("send", "pageview");

Types of special indicators

Special measures of type Integer or Time are expressed using integers, while special measures of type Currency can be expressed as fixed decimal values ​​in the local currency.

Data processing

The access scope determines which accesses it will apply to. given value special parameter, and profile filters – which hits and their corresponding values ​​will be included in .

Access scope and priorities

The access scope determines which hits will be associated with a specific custom parameter value. There are four such areas in total: product, appeal, session And user.

  • Product– the value applies only to the product for which it was specified. This access area is used for advanced electronic commerce only.
  • Appeal– the value applies only to the request for which it was specified.
  • Session– the value applies to all hits in the session.
  • User– The value applies to all hits in the current session and future sessions until it changes or the setting is no longer active.
Access area "Product"

With this scope, the value of the special parameter applies only to the product for which it was set. Several products and, accordingly, several special parameters with different scopes of the “Products” level can be sent in one request.

Access area "Appeal"

With this scope, the value of the special parameter applies only to the hit for which it was specified (see rice. 1, rice. 2 And rice. 3 below).

Picture 1. The user sends two requests: H1 and H2. The H2 access has a special parameter CD1 with the value A. This value applies only to H2.

Figure 2. The user submits the third H3 hit. There is no special parameter associated with H3.

Figure 3. The user sends the fourth hit H4. The H2 access has a special parameter CD1 with the value B. This value applies only to H4.

Access area "Session"

When two values ​​are specified in the same session with the scope "Session" and the same sequence number, the first one takes precedence. This value applies to all hits during the session. On Figure 4 you can see that the last value overrides all previous ones for a special parameter with the same index.

Picture 1. The user submits an H1 hit without a special parameter value.

Figure 2. In the same session, the user sends a hit to H2 with a special parameter CD1 whose value is A. The value A is also used for H1.

Figure 3. The user submits a third H3 hit. For H3, the value CD1 is not defined, but the value A is automatically used within one session.

Figure 4. The user sends a fourth H4 hit with a new B value for CD1. In all previous calls within the same session, the value of A is changed to B.

Access area "User"

If two special parameters with a scope of "User" are specified in the same session, the last value is given priority during the current session, and the same value is used in future sessions of that user.

On Figure 2 the value of special parameter A is applied to all hits in session 2, similar to the special parameter at the session level. However, on Figure 3 the value A also applies to hits in the third session because the special parameter CD1 operates at the user level.

Picture 1. Three hits occurred during the user session: H1, H2, and H3. There are no special parameters specified for any of them.

Figure 2. The user returns to the site and makes three visits in the second session. For H3, the value of CD1 is A. This is used for all three hits within the session.

Figure 3. Three hits were logged in the user's third session. The value A for the custom parameter CD1, set at the user level, is used for all hits in the third session.

Filters

View filters can be applied to custom dimensions and metrics in several ways.

The values ​​of special parameters and indicators are associated with the treatment with which they were transmitted. The access area does not play a role in this case. If such a hit is filtered out of the view, the custom dimension or metric may also be filtered out.

  1. Treatment level. When you delete a case, the case-level custom dimensions and custom metrics associated with it are filtered out.
  2. Session or user level. Session- or user-level specific parameters will not be filtered, even if the hit on which they were passed is filtered. Their values ​​are used for all calls within the session, and with the scope "User" - also in future sessions.

You can also create filters for hits based on the scope of special parameters. For example, if you set a filter to a specific user-level custom parameter value, all user sessions that include that value will be discarded.

Reports

After processing, custom dimensions and metrics appear in Analytics reports.

Custom dimensions and metrics presented in your own reports can be used to create advanced segments. Custom dimensions can also be added as additional dimensions to standard reports.

Examples

The developer recently released a new game to the market.

The current Analytics code counts a screen view every time a user reaches a certain level of the game. The developer already knows how many times users run each level, and now he is interested in more complex questions:

  1. How many times have users played levels of varying difficulty?
  2. How many levels did users play on different days of the trial period?
  3. How many levels did trial and paid app users play?

Grouping hits, sessions, and users using specific dimensions and metrics will help answer these questions.

In addition, the application sells various kinds of improvements that make the gameplay easier. Accordingly, in addition to categories and options, the developer needs a separate field to track the popularity of improvements among users.

Access area "Appeal"

Let's look at how to use special parameters at the hit level to find out how many times users have played levels of different difficulties.

The developer already tracks screen views and knows how many times users launch each level. It remains to find out which level – simple, medium or difficult – is most often chosen by gamers.

Using a specific hit-level parameter, each screen view can be assigned to a specific difficulty level. This will let you know which difficulty level has the most views.

Why exactly the level of circulation?

During one session, the user can visit different levels. If the scope of action is "Handling", the difficulty value will only be assigned to the screen view with which it was passed. As a result, each screen view will be associated with a unique level of difficulty.

Settings

The first step is to define a custom setting in the Admin tab in Analytics. Here's what the definition would look like in our case:

Data collection

The developer is already tracking the completion of game levels by screen views. To assign a difficulty level to each of them, you must set a special parameter value before calling the tracking code.

This is what it will look like:

Ga("create", "UA-XXXX-Y", "auto"); // Selecting a value for a special parameter with index 1. ga("set", "cd1", "easy"); // Passing the value of a special parameter with a request - page view. ga("send", "pageview", "/level_1/");

In this example, the custom parameter is set just before screen view tracking. Thus, along with viewing the screen, the difficulty level will be transmitted, by which the requests will then be grouped in reports.

Data processing

This is what the data might look like for one player who has played six levels in a session:

UserId = 5555 Session 1: H1: screen_name=/level_1/ cd1_value=easy H2: screen_name=/level_2/ cd1_value=medium H3: screen_name=/level_3/ cd1_value=hard H4: screen_name=/level_4/ cd1_value=easy H5: screen_name= /level_5/ cd1_value=medium H6: screen_name=/level_6/ cd1_value=medium

The "Hit" scope ensures that the difficulty value is only associated with the screen view with which it was sent.

Reports

Since each screen view has been assigned a difficulty level, the developer can now create a report using the screen name and difficulty level as parameters, and screen views as metrics:

To find out how many times each level was launched, you can create your own report with the main parameter “Difficulty Level”, by which screen views will be grouped:

The report shows that users preferred the medium difficulty level. Get this important information The developer was helped by grouping screen views using hit-level parameters.

Access area "Session"

Now let's look at how to find out how many levels users played on each of the three days of the trial period.

To do this you need the following report:

Using a custom session-level setting, you can group screen views by day to find out which day users launched the most levels.

Why session level?

By selecting the Session scope, you can group all sessions and hits related to the same Trial Day value.

The same result can be achieved using the Case action scope, but the session level requires minimal code changes to set the Trial Day value.

Settings

The special parameter "Day of trial period" is defined in the Analytics resource settings as follows:

Data collection

The developer already tracks screen views for each level of the game. To associate a trial day with all screen views during a session, you only need to set the custom parameter value once per session.

Ga("create", "UA-XXXX-Y", "auto"); // Selecting a value for a special parameter with index 2. var day = getDayOfTrial(); ga("set", "dimension2", day); // Passing the value of a special parameter with a request - page view. ga("send", "pageview", "/level_1/");

A custom session-level setting can be set at any time during a session. However, in our example, it is easier for the developer to do this at the beginning of the session.

Data processing

Custom parameter values ​​passed to Analytics will be applied to hits based on their scope.

For example, here's what the data would look like for a user who played the game twice on the first day, once on the second, and again on the third:

UserId = 5555 Session 1: H1: screen_name=/level_1/ cd2_value=1 H2: screen_name=/level_2/ H3: screen_name=/level_2/ Session 2: H4: screen_name=/level_3/ cd2_value=1 H5: screen_name=/level_4/ H6: screen_name=/level_4/ Session 3: H1: screen_name=/level_1/ cd2_value=2 H2: screen_name=/level_2/ H3: screen_name=/level_3/ Session 4: H1: screen_name=/level_3/ cd2_value=3

Note that custom parameter values ​​are transmitted with only one screen view per session.

The Session access scope ensures that the Trial Day value is associated with all hits in that session, not just the one with which it was sent.

Reports

Once processed, session-level custom parameter values ​​will be assigned to all screen views received in a single session. Now the developer can create a report based on the Trial Day and Screen Title parameters, as well as the Screen Views metric:

By grouping screen views by day, the developer will see how many levels users played on each of the three days of the trial period. To do this, you need to create your own report with the main parameter “Day of trial period”:

As can be seen from the report, players completed the most levels on the first day, and noticeably less on the second and third. Grouping sessions and hits by one value using a special parameter at the session level helped to obtain this important information.

Access area "User"

Finally, let's find out how many levels the paid and trial users completed.

To do this you need the following report:

Using a custom user-level parameter, you can associate all screen views of a specific user (both in the current session and future ones) with a player type.

Why user level?

The User access area allows you to easily group all user sessions and accesses. This works ideally with values ​​that remain the same for a specific user, such as "Player Type" as in our case.

The same result can be achieved using the hit and session layers, but the user layer is much more convenient because it requires minimal changes to the code.

Settings

The special parameter "Player Type" is defined in the "Administrator" section as follows:

Data collection

As in the previous examples, the developer already knows the number of screen views for each level of the game. To group these screen views by player type, simply define this special parameter when starting the game and then again when upgrading to its paid version.

The developer will need to define a special parameter when the user starts the game:

Ga("create", "UA-XXXX-Y", "auto"); // Selecting a value for a special parameter with index 3. ga("set", "dimension3", "Free"); // Passing the value of a special parameter with a request - page view. ga("send", "pageview", "/level_1/");

The same special parameter must be set when upgrading to the paid version:

Ga("create", "UA-XXXX-Y", "auto"); // Selecting a value for a special parameter with index 3. ga("set", "dimension3", "Paid"); // Passing the value of a special parameter with a request - page view. ga("send", "pageview", "/level_1/");

Data processing

Custom parameter values ​​passed to Analytics will be applied to hits based on their scope.

For example, this is what the data would look like for a user who played the game twice for free and once for a fee:

UserId = 5555 Session 1: H2: screen_name=/level_1/ cd3_value=free H3: screen_name=/level_2/ Session 2: H1: screen_name=/level_2/ H2: screen_name=/level_3/ H3: screen_name=/level_3/ Session 3: H1: screen_name=/level_3/ cd3_value=paid H2: screen_name=/level_4/

Note that the free value set in the first session applies to all hits from the first and second sessions, since the paid value is set only in the third session.

Reports

Player Type custom parameter values ​​will be associated with the sessions in which they were set, as well as all future sessions and hits.

Now the developer can create a report based on the Player Type and Screen Title parameters, as well as the Screen Views metric:

Finally, let's group screen views by player type to compare the number of levels between the free and paid versions. To do this, you need to create your own report with the main parameter “Player Type”:

As you can see, in terms of the number of levels, the advantage is free version games. Grouping users and their sessions and hits by one value using a custom user-level parameter helped to obtain this important information.

Access area "Product"

Let's look at how to use special parameters at the product level to find out which upgrades (minimal, medium or strong) players purchase more often than others.

So, the developer is already tracking the number of upgrade purchases using enhanced e-commerce. It remains to be seen which level of improvements are in greatest demand among users.

The report will look something like this:

Previously, it was possible to find out the total income from the sale of improvements in the game, but without a breakdown by level.

A special parameter at the product level allows you to assign an improvement level to each product. The reports will indicate which level of upgrades users purchase most often. You can also get similar statistics on the number of views, clicks, and other enhanced ecommerce actions.

Why exactly the product level?

The user can purchase several upgrades at the same time. If the scope of action is "Product", the level value will be assigned only to the product with which it was transferred. As a result, each upgrade you purchase will be associated with a unique level.

Settings

The special parameter "Enhancement Level" is defined in the Analytics resource settings as follows:

Data collection

The developer is already tracking purchases of improvements in the game. To assign each of them a certain level, you need to set the value of a special parameter along with product data.

Here's how to add a parameter to a product:

Ga("ec:addProduct", ( // Adding product data to the productFieldObject. "id": "P12345", // Product ID (string). "name": "Powerup", // Product name (string) . "category": "Extras", // Product category (string). "variant": "red", // Product variant (string). "price": "10.00", // Product price (currency). quantity": 2, // Quantity of products (number). "dimension4": "strong" // Special parameter at the product level (string). )); ga("ec:setAction", "purchase", ( "id": "T12345", "revenue": "20.00" )); ga("send", "pageview"); // Send transaction data with the original page view.

In this example, a custom parameter is defined along with the product information and specifies the level of the corresponding enhancement.

Data processing

As in the previous examples, custom parameter values ​​passed to Analytics will be applied to hits based on their scope.

This is what the data might look like for one player who purchased three upgrades in a session:

UserId = 5555 Session 1: H1: product_name=powerup cd4_value=weak product_name=powerup cd4_value=strong H2: product_name=powerup cd4_value=weak

Using the Product scope ensures that the parameter value for each enhancement is associated only with the product it was shipped with.

Reports

You can then create your own income report for each improvement level:

IN in this case minimum level improvements generated the most revenue.

Special indicators

Scope

Special indicators also have their own scope, which allows them to be compared with parameters of the same level. Thus, product level indicators are associated only with the product with which they were sent. The following are two examples of custom metrics.

Special indicator at the circulation level

In the examples above, the developer tracked screen views for each level of the game, so all reports use the Screen Views metric. It indicates the user's attempt to complete the level.

However, the developer is also interested in the completion rate of each level.

To do this, the developer adds a special indicator “Completed levels” and then compares their number with the number of screen views for each level.

Screen titleScreen viewsCompleted levels
/level_1/
/level_2/
/level_3/

Why are special indicators needed?

Custom metrics, as opposed to standard metrics (events, screen views, etc.), allow you to create more flexible and visual reports with the data that interests you most.

In our example, completed levels cannot be tracked as screen views because they will be counted twice for each level.

While events can be used individually, due to their hierarchical nature, it would be difficult to create the report shown above by combining screen views and levels completed into a single parameter.

Given these facts and the importance of such information for the developer, it is most convenient to track completed levels as a special indicator.

Settings

The special indicator "Completed levels" can be set in the Analytics settings:

Data collection

The developer already tracks the launch of each level using screen views. Now he is interested in how many levels users complete. For this purpose, he creates a special indicator.

Custom metrics, like custom dimensions, are sent to Analytics along with hits. Therefore, the developer will need to send an additional request that registers the completion of the game level. In this example, at the end of the level, an event will be triggered, with which a special indicator will be associated.

This is what it will look like:

Ga("create", "UA-XXXX-Y", "auto"); // Increase the completed level by 1. ga("set", "metric1", 1); // Passing the value of a special parameter with an event call. ga("send", "event", "Level", "completion");

Data processing

Before processing, data about one user who launched three levels of the game in one session will look like this:

UserId = 5555 Session 1 H1: type=screen_view screen_name=/level_1/ H2: type=event screen_name=/level_1/ cm1_value=1 H3: type=screen_view screen_name=/level_2/ H4: type=screen_view screen_name=/level_2/ H5: type=screen_view screen_name=/level_2/ H6: type=event screen_name=/level_2/ cm1_value=1 H7: type=screen_view screen_name=/level_3/ H8: type=event screen_name=/level_3/ cm1_value=1

Reports

You can now create a report with the Screen Title parameter and the Screen Views, Total Events, and Levels Completed metrics:

This data suggests that the second level is actually more difficult than the first and third, with a completion rate of only 33%. By tracking the progress of levels using a special indicator, the developer can easily obtain the data he is interested in in the form of simple, visual reports.

Product-level custom metric

In the examples above, the developer tracks upgrade purchases and can associate various metrics with each upgrade, such as quantity or revenue generated.

For this purpose, a special indicator “Spent bonuses” is used.

Here's the report you need for this:

Settings

The special parameter "Spent bonuses" is defined in the "Administrator" section:

Data collection

Custom metrics, like custom dimensions, are sent to Analytics along with product data.

This is what it will look like:

Ga("ec:addProduct", ( // Adding product data to the productFieldObject. "id": "P12345", // Product ID (string). "name": "Powerup", // Product name (string) . "category": "Extras", // Product category (string). "variant": "red", // Product variant (string). "price": "10.00", // Product price (currency). quantity": 2, // Quantity of products (number). "dimension4": "strong", // Special parameter at the product level (string). "metric2": 5 // Special indicator at the product level (integer). ) ); ga("ec:setAction", "purchase", ( "id": "T12345", "revenue": "20.00" )); ga("send", "pageview"); // Send transaction data with the original page view.

Data processing

Before processing, data about one player who has purchased several upgrades will look like this:

UserId = 5555 Session 1 H1: type=screen_view screen_name=/level_1/ H2: type=screen_view screen_name=/level_2/ product_name=powerup cd4_value=weak cm4_value=5 product_name=powerup cd4_value=strong cm4_value=5 H4: type=screen_view screen_name= /level_2/ product_name=powerup cd4_value=medium cm4_value=1 product_name=powerup cd4_value=weak cm4_value=10

Reports

Now you can create a report with the "Improvement Level" parameter, as well as the "Product Revenue" and "Bonuses Spent" indicators:

Obviously, players prefer to spend bonuses on minimal improvements, and mid-level improvements bring the greatest profit to the developer.

Notes

Here are a few things to consider when working with custom dimensions and metrics.

Editing an existing dimension and metric

If you change the name of an existing custom dimension or measure, your data will be affected as follows:

  • Editing the title affects already processed data: you will only be able to receive it under a new name.
  • Changing Scope does not affect processed data: the new scope will only apply to new data.
  • Change of status. The status field determines whether the values ​​of a custom dimension or metric will be processed.

If the status is inactive, they will appear in reports, but there will be no data for them.

When choosing a scope for a custom parameter, consider how often the value will change. If this will happen multiple times per session, as is the case with the game level, select the hit level and set the value before each hit. If the value does not change during the session, as is the case with age, then the special parameter only needs to be set once at the user level. Always choose the right scope to avoid mistakes.

Was this information useful?

How can this article be improved?