Google Tag Manager Practical Guide:Setting Up Custom Dimensions | BCS

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

Google Tag Manager BCS 9 months ago (12-22) 339 Views 0 Comments

In this section I will explain how to set up custom dimensions.  Assume that we are setting the user dimension this time. We will put the user level information on the page in the form of JS variables, and then get it through the variable of Google Tag Manager to set it as the custom dimension.

Setup Process

1、Create a custom dimension in Google Analytics

Click “Admin”→ “Custom Definitions” → “Custom Dimension” → “+ New Custom Dimension” in Google Analytics, There is a scope here, including Hit, Session, User, and Product. This is a custom dimension that you want to pass. The user level is tied to the user, so it is the User level.

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

Specific settings such as:

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

and then write down its index value. This is the index value is 3. This index value will be used later.

2、Put user level information on the page

This requires development support. The user level information is put on the page in the following format:

<span style="font-size: 12pt;"><script>
UserLevel="A";
</script>
</span>

This is actually a JavaScript variable.

2、User variable to get user level information

In Google Tag Manager click “Variables” → “New” → “Select a variable type to start setting …” → “JavaScript Variables”, The specific configuration is as follows:

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

The Global Variable Name is filled with the name of the JavaScript variable placed on the page.

3、Turn global variables into custom dimensions

In the Google Analytics default tracking code, we are here to set the basic tracking code through google analytics settings, so we need to configure in Google Analytics Settings:

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

 

Find the custom dimension in “More Settings” and configure it as shown:

Google Tag Manager Practical Guide:Setting Up Custom Dimensions

Index is filled with the index we created in Google Analytics, and the value is the variable User Level. Then save it.

4、Preview  and Publish

Click Preview in the upper right corner, and you can publish without any problems.

Summary

To use a custom dimension, you need to first determine the level of the custom dimension, whether it is Hit or Session, or User, Product, and the first three are generally used. The way to judge is to see how long this customization is the dimension life cycle before it changes.

 


If you don't understand, You can leave a comment below or email me (haran.huang@ichdata.com).
Like (0)
Post my comment
Cancel comment
Expression Texture Bold Strikethrough Center Italic Sign in

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website