0

We are building a website which has a set of public pages, and private pages. For Web Analytics, we are using Google Analytics. We have a unique userId which can identify the user once he login. So this takes care of the private pages in the site. We have couple of questions related to the User identification.

  1. For the public pages, since we do not have a userId, should we leave the userId property as empty?
  2. Is there a way in which we can link the user's activity that happened between the private and public pages (assuming the cookies are there in the browser). Does GA rely on the clientId property to link it?
  3. What is the recommended approach with respect to user id tracking when we have public and private pages in the same site?
4

1 回答 1

0

我回答以下几点:

  1. 如果您没有,则userId不应发送参数,这样您就不会冒着将空值覆盖到与用户关联的值 (userId) 的风险。如果你不能避免发送它,它的值必须是undefined.

  2. clientId(和/或userId)作为用户级自定义维度发送(cookie 必须相同)。

  3. 与设想的方法相同userId:如果存在用户标识符,则将其发送到谷歌分析,否则不发送参数(参见第 1 点)。

于 2020-10-06T21:10:51.130 回答