I want to set the user details in Google analytics. I using the following syntax but it is not working to capture the use those who logged in an application.
我想在Google Analytics中设置用户详细信息。我使用以下语法,但它无法捕获使用登录应用程序的人。
ga('set', 'employeetype', 'permanent');
ga('set', 'employeetype', 'vendor');
ga('set', 'employeetype', 'temporary');
1 个解决方案
#1
2
You need to send the number of the custom dimension that was set up in Google analytics
您需要发送在Google Analytics中设置的自定义维度的编号
ga('set', 'dimension1', 'permanent');
You can't use the name you sent that is for you Google Analytics has no understanding of it. Make sure you check Google Analytics and get the correct number corresponding to employeetype dimension (dimensions are set via the "dimension" prefix and the numerical index from the list of dimensions in the GA backend - the index more or less shows the order in which dimensions are created).
您无法使用您发送给您的名称,Google Analytics对此并不了解。请务必检查Google Analytics并获取与employeesetype维度相对应的正确数字(维度通过“维度”前缀和GA后端维度列表中的数字索引设置 - 索引或多或少显示维度的顺序已创建)。
Dimensions come in different "scopes" - hit level (i.e. they are connected to every single interaction), session level (i.e. they record only the last value set during a session) and user level (i.e. they are applied to a recurring visitor). Unless you expect your employees to change their type rather often you should probably set this to user level scope (but that's a backend setting, code is the same).
维度有不同的“范围” - 命中级别(即它们连接到每个单独的交互),会话级别(即它们仅记录会话期间设置的最后一个值)和用户级别(即它们应用于重复访问者)。除非您希望您的员工经常更改其类型,否则您应该将其设置为用户级范围(但这是后端设置,代码是相同的)。
#1
2
You need to send the number of the custom dimension that was set up in Google analytics
您需要发送在Google Analytics中设置的自定义维度的编号
ga('set', 'dimension1', 'permanent');
You can't use the name you sent that is for you Google Analytics has no understanding of it. Make sure you check Google Analytics and get the correct number corresponding to employeetype dimension (dimensions are set via the "dimension" prefix and the numerical index from the list of dimensions in the GA backend - the index more or less shows the order in which dimensions are created).
您无法使用您发送给您的名称,Google Analytics对此并不了解。请务必检查Google Analytics并获取与employeesetype维度相对应的正确数字(维度通过“维度”前缀和GA后端维度列表中的数字索引设置 - 索引或多或少显示维度的顺序已创建)。
Dimensions come in different "scopes" - hit level (i.e. they are connected to every single interaction), session level (i.e. they record only the last value set during a session) and user level (i.e. they are applied to a recurring visitor). Unless you expect your employees to change their type rather often you should probably set this to user level scope (but that's a backend setting, code is the same).
维度有不同的“范围” - 命中级别(即它们连接到每个单独的交互),会话级别(即它们仅记录会话期间设置的最后一个值)和用户级别(即它们应用于重复访问者)。除非您希望您的员工经常更改其类型,否则您应该将其设置为用户级范围(但这是后端设置,代码是相同的)。