Is google analytics new user affected by lookback window?

≯℡__Kan透↙ 提交于 2021-01-27 19:05:43

问题


I recently found out that visitNumber in big query google analytics export starts over at 1 if a user has not visited the site in 183 days or more. I am now trying to understand if the same lookback window is applied when google analytics defines new users?


回答1:


The result of SUM(totals.newVisits) in bigquery is exactly the same as the new user count reported in Google Analytics Audience report for a day in my exported data that has users marked as new visitors eventhough they have visited our site earlier. I therefore conclude that google analytics also uses the same lookback window.

I found that in order to count new users depending on their actual first visit (cookie creation date) it's possible to use the last part of the client id. As an example, this query finds the number of new users for 20181025:

   #StandardSQL
   SELECT SUM(CASE WHEN cookie_date = '2018-10-25' THEN 1 ELSE 0 END) AS new_visitors, 
          count(*) AS all_visitors
   FROM (SELECT clientId, 
                DATE(TIMESTAMP_ADD("1970-01-01 00:00:00 UTC", INTERVAL min(CAST(REGEXP_EXTRACT(clientId, r'[0-9]*$') AS INT64)) SECOND), "Europe/Berlin") as 
   cookie_date
         FROM `xxx.ga_sessions_20181025`
         GROUP BY clientId)


来源:https://stackoverflow.com/questions/53187173/is-google-analytics-new-user-affected-by-lookback-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!