{
  "id": 69635,
  "title": "Query on multiple \"New visits\"",
  "url": "/competitions/ga-customer-revenue-prediction/discussion/69635",
  "author_name": "",
  "post_date": "2018-10-25T14:41:22.940039500Z",
  "votes": null,
  "comment_count": 10,
  "views": 0,
  "content": "<p>According to the definition of new visit, if a visit is considered as \"new\" if he/she logs in from different device category or the time from previous visit exceeds 2 yrs. \n<a href=\"https://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/\">https://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/</a>\nBut in the data ,Some of the \"fullvisitorIds\" have multiple \"1\" values in \"newvisits\" column even though device category is the same. How can the visits be \"Newvisits\"? any help?\nThanks in advance</p>",
  "messages": [
    {
      "id": "410165",
      "postDate": "10/25/2018 14:41:22",
      "content": "<p>According to the definition of new visit, if a visit is considered as \"new\" if he/she logs in from different device category or the time from previous visit exceeds 2 yrs. \n<a href=\"https://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/\">https://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/</a>\nBut in the data ,Some of the \"fullvisitorIds\" have multiple \"1\" values in \"newvisits\" column even though device category is the same. How can the visits be \"Newvisits\"? any help?\nThanks in advance</p>",
      "rawMarkdown": "According to the definition of new visit, if a visit is considered as \"new\" if he/she logs in from different device category or the time from previous visit exceeds 2 yrs. \nhttps://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/\nBut in the data ,Some of the \"fullvisitorIds\" have multiple \"1\" values in \"newvisits\" column even though device category is the same. How can the visits be \"Newvisits\"? any help?\nThanks in advance",
      "votes": null
    },
    {
      "id": "410510",
      "postDate": "10/26/2018 07:18:48",
      "content": "<p>FYI - you can refer to this <a href=\"https://support.google.com/analytics/answer/3437719?hl=en\">official document</a> just in case.</p>\n\n<p>Do you have a particular <code>fullVisitorId</code> to make it easier to check?</p>",
      "rawMarkdown": "FYI - you can refer to this [official document][1] just in case.\n\nDo you have a particular `fullVisitorId` to make it easier to check?\n\n\n  [1]: https://support.google.com/analytics/answer/3437719?hl=en",
      "votes": null
    },
    {
      "id": "410565",
      "postDate": "10/26/2018 09:13:47",
      "content": "<p>check this fullvisitorId : 0196863072768685901</p>",
      "rawMarkdown": "check this fullvisitorId : 0196863072768685901",
      "votes": null
    },
    {
      "id": "410587",
      "postDate": "10/26/2018 10:05:34",
      "content": "<p>I take a look at the data and confirm that the <code>fid</code> 0196863072768685901do have two <code>totals.newVisits</code> equals 1. Also notice that the <code>visitNumber</code> was reset to 1 on 2017 Jul 18, and the previous visit happened on 2016 Nov 12.</p>\n\n<p>After a bit of research, I land on 2 references <a href=\"https://stackoverflow.com/questions/40851315/visitnumber-getting-reset-in-bigquery-export-of-google-analytics\">1</a> &amp; <a href=\"https://plus.google.com/+ConversionworksUk/posts/dbwtAPxFCSL\">2</a> which suggest that although the default cookie expiration time is 2 years, the <code>visitNumber</code> field is reset every 183 days (~6 months). This matches with our observation as the visitor's 2 visits had a gap more than 6 months in between. However, I cannot find any official document supporting this claim.</p>\n\n<p>As side note, 6 months is also the default campaign timeout period in GA. Perhaps there is a correlation here?</p>",
      "rawMarkdown": "I take a look at the data and confirm that the `fid` 0196863072768685901do have two `totals.newVisits` equals 1. Also notice that the `visitNumber` was reset to 1 on 2017 Jul 18, and the previous visit happened on 2016 Nov 12.\n\nAfter a bit of research, I land on 2 references [1][1] &amp; [2][2] which suggest that although the default cookie expiration time is 2 years, the `visitNumber` field is reset every 183 days (~6 months). This matches with our observation as the visitor's 2 visits had a gap more than 6 months in between. However, I cannot find any official document supporting this claim.\n\nAs side note, 6 months is also the default campaign timeout period in GA. Perhaps there is a correlation here?\n\n\n  [1]: https://stackoverflow.com/questions/40851315/visitnumber-getting-reset-in-bigquery-export-of-google-analytics\n  [2]: https://plus.google.com/+ConversionworksUk/posts/dbwtAPxFCSL",
      "votes": null
    },
    {
      "id": "410619",
      "postDate": "10/26/2018 10:54:51",
      "content": "<p>Yes. I am aware that its \"2yrs\" after a cookie gets expired. check this visitorid \"096537227179026965\" where a newvisit has been marked even though the time difference between successive visits is less than 6 months (just 1.5 month) . But in this case channel group of the second visit differed from the first one (Referral - Direct) \nSo visit can be considered \"newvisit\" even if the channel group changes? (this is not mentioned as such in official documentation) </p>",
      "rawMarkdown": "Yes. I am aware that its \"2yrs\" after a cookie gets expired. check this visitorid \"096537227179026965\" where a newvisit has been marked even though the time difference between successive visits is less than 6 months (just 1.5 month) . But in this case channel group of the second visit differed from the first one (Referral - Direct) \nSo visit can be considered \"newvisit\" even if the channel group changes? (this is not mentioned as such in official documentation)",
      "votes": null
    },
    {
      "id": "410650",
      "postDate": "10/26/2018 12:00:39",
      "content": "<p>No, I do not think <code>visitNumber</code> will be reset due to channel change. The 2nd session of this user does not reset the <code>visitNumber</code>, it is the 3rd session which takes place &gt;6 months after the 2nd session that is reset.</p>\n\n<p>In my work we use GA to track multiple websites, and I can say for sure that by default channel change does not do this. Unless that particular site has some special setting.</p>",
      "rawMarkdown": "No, I do not think `visitNumber` will be reset due to channel change. The 2nd session of this user does not reset the `visitNumber`, it is the 3rd session which takes place &gt;6 months after the 2nd session that is reset.\n\nIn my work we use GA to track multiple websites, and I can say for sure that by default channel change does not do this. Unless that particular site has some special setting.",
      "votes": null
    },
    {
      "id": "410653",
      "postDate": "10/26/2018 12:11:22",
      "content": "<p>Thanks for clarifying. But for the above visitorid even the second visit is considered as new visit..I am wondering how? Ideally channel change shouldn't be considered as new visit but it's happening here in this dataset.. don't know why</p>",
      "rawMarkdown": "Thanks for clarifying. But for the above visitorid even the second visit is considered as new visit..I am wondering how? Ideally channel change shouldn't be considered as new visit but it's happening here in this dataset.. don't know why",
      "votes": null
    },
    {
      "id": "410815",
      "postDate": "10/26/2018 17:50:40",
      "content": "<p>Wait a sec... seems we are seeing different things - in my memory that visitor has 3 sessions, but only 1st and 3rd have the <code>newVisits</code> variable equals 1, the 2nd is 0. Let me check again tomorrow.</p>",
      "rawMarkdown": "Wait a sec... seems we are seeing different things - in my memory that visitor has 3 sessions, but only 1st and 3rd have the `newVisits` variable equals 1, the 2nd is 0. Let me check again tomorrow.",
      "votes": null
    },
    {
      "id": "411811",
      "postDate": "10/29/2018 04:07:48",
      "content": "<p>I double-check my data and confirm that for <code>0196863072768685901</code>, only the 1st and 3rd sessions (happened on 2016 Sep 30 and 2017 Jul 18) have <code>totals.newVisit</code> equals 1, the 2nd session on 2016 Nov 12 has <code>totals.newVisit</code> equals to 0. Do you want to double-check on your side too?</p>",
      "rawMarkdown": "I double-check my data and confirm that for `0196863072768685901`, only the 1st and 3rd sessions (happened on 2016 Sep 30 and 2017 Jul 18) have `totals.newVisit` equals 1, the 2nd session on 2016 Nov 12 has `totals.newVisit` equals to 0. Do you want to double-check on your side too?",
      "votes": null
    },
    {
      "id": "411863",
      "postDate": "10/29/2018 05:58:25",
      "content": "<p>Oops!!  actually i merged train and test datasets. the visitor id has 4 visits overall and 3 new visits. the one with \"non-new\" visit is with less than 6 months time span. I guess u r right \"6 months\" is the span to consider a new visit . Thanks a lot for ur efforts :)</p>",
      "rawMarkdown": "Oops!!  actually i merged train and test datasets. the visitor id has 4 visits overall and 3 new visits. the one with \"non-new\" visit is with less than 6 months time span. I guess u r right \"6 months\" is the span to consider a new visit . Thanks a lot for ur efforts :)",
      "votes": null
    },
    {
      "id": "411877",
      "postDate": "10/29/2018 06:16:56",
      "content": "<p>Glad to help. I learn a new thing too!</p>",
      "rawMarkdown": "Glad to help. I learn a new thing too!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 410510,
      "author_name": "comsaint",
      "author_url": "",
      "post_date": "10/26/2018 07:18:48",
      "content": "<p>FYI - you can refer to this <a href=\"https://support.google.com/analytics/answer/3437719?hl=en\">official document</a> just in case.</p>\n\n<p>Do you have a particular <code>fullVisitorId</code> to make it easier to check?</p>",
      "votes": null,
      "replies": [
        {
          "id": 410565,
          "author_name": "rajuspartan",
          "author_url": "",
          "post_date": "10/26/2018 09:13:47",
          "content": "<p>check this fullvisitorId : 0196863072768685901</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 410587,
          "author_name": "comsaint",
          "author_url": "",
          "post_date": "10/26/2018 10:05:34",
          "content": "<p>I take a look at the data and confirm that the <code>fid</code> 0196863072768685901do have two <code>totals.newVisits</code> equals 1. Also notice that the <code>visitNumber</code> was reset to 1 on 2017 Jul 18, and the previous visit happened on 2016 Nov 12.</p>\n\n<p>After a bit of research, I land on 2 references <a href=\"https://stackoverflow.com/questions/40851315/visitnumber-getting-reset-in-bigquery-export-of-google-analytics\">1</a> &amp; <a href=\"https://plus.google.com/+ConversionworksUk/posts/dbwtAPxFCSL\">2</a> which suggest that although the default cookie expiration time is 2 years, the <code>visitNumber</code> field is reset every 183 days (~6 months). This matches with our observation as the visitor's 2 visits had a gap more than 6 months in between. However, I cannot find any official document supporting this claim.</p>\n\n<p>As side note, 6 months is also the default campaign timeout period in GA. Perhaps there is a correlation here?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 410619,
          "author_name": "rajuspartan",
          "author_url": "",
          "post_date": "10/26/2018 10:54:51",
          "content": "<p>Yes. I am aware that its \"2yrs\" after a cookie gets expired. check this visitorid \"096537227179026965\" where a newvisit has been marked even though the time difference between successive visits is less than 6 months (just 1.5 month) . But in this case channel group of the second visit differed from the first one (Referral - Direct) \nSo visit can be considered \"newvisit\" even if the channel group changes? (this is not mentioned as such in official documentation) </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 410650,
          "author_name": "comsaint",
          "author_url": "",
          "post_date": "10/26/2018 12:00:39",
          "content": "<p>No, I do not think <code>visitNumber</code> will be reset due to channel change. The 2nd session of this user does not reset the <code>visitNumber</code>, it is the 3rd session which takes place &gt;6 months after the 2nd session that is reset.</p>\n\n<p>In my work we use GA to track multiple websites, and I can say for sure that by default channel change does not do this. Unless that particular site has some special setting.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 410653,
          "author_name": "rajuspartan",
          "author_url": "",
          "post_date": "10/26/2018 12:11:22",
          "content": "<p>Thanks for clarifying. But for the above visitorid even the second visit is considered as new visit..I am wondering how? Ideally channel change shouldn't be considered as new visit but it's happening here in this dataset.. don't know why</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 410815,
          "author_name": "comsaint",
          "author_url": "",
          "post_date": "10/26/2018 17:50:40",
          "content": "<p>Wait a sec... seems we are seeing different things - in my memory that visitor has 3 sessions, but only 1st and 3rd have the <code>newVisits</code> variable equals 1, the 2nd is 0. Let me check again tomorrow.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 411811,
          "author_name": "comsaint",
          "author_url": "",
          "post_date": "10/29/2018 04:07:48",
          "content": "<p>I double-check my data and confirm that for <code>0196863072768685901</code>, only the 1st and 3rd sessions (happened on 2016 Sep 30 and 2017 Jul 18) have <code>totals.newVisit</code> equals 1, the 2nd session on 2016 Nov 12 has <code>totals.newVisit</code> equals to 0. Do you want to double-check on your side too?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 411863,
          "author_name": "rajuspartan",
          "author_url": "",
          "post_date": "10/29/2018 05:58:25",
          "content": "<p>Oops!!  actually i merged train and test datasets. the visitor id has 4 visits overall and 3 new visits. the one with \"non-new\" visit is with less than 6 months time span. I guess u r right \"6 months\" is the span to consider a new visit . Thanks a lot for ur efforts :)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 411877,
          "author_name": "comsaint",
          "author_url": "",
          "post_date": "10/29/2018 06:16:56",
          "content": "<p>Glad to help. I learn a new thing too!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "410165": "According to the definition of new visit, if a visit is considered as \"new\" if he/she logs in from different device category or the time from previous visit exceeds 2 yrs. \nhttps://www.dbswebsite.com/blog/2016/10/04/google-analytics-made-easy-new-visitors-vs-returning-visitors/\nBut in the data ,Some of the \"fullvisitorIds\" have multiple \"1\" values in \"newvisits\" column even though device category is the same. How can the visits be \"Newvisits\"? any help?\nThanks in advance",
    "410510": "FYI - you can refer to this [official document][1] just in case.\n\nDo you have a particular `fullVisitorId` to make it easier to check?\n\n\n  [1]: https://support.google.com/analytics/answer/3437719?hl=en",
    "410565": "check this fullvisitorId : 0196863072768685901",
    "410587": "I take a look at the data and confirm that the `fid` 0196863072768685901do have two `totals.newVisits` equals 1. Also notice that the `visitNumber` was reset to 1 on 2017 Jul 18, and the previous visit happened on 2016 Nov 12.\n\nAfter a bit of research, I land on 2 references [1][1] &amp; [2][2] which suggest that although the default cookie expiration time is 2 years, the `visitNumber` field is reset every 183 days (~6 months). This matches with our observation as the visitor's 2 visits had a gap more than 6 months in between. However, I cannot find any official document supporting this claim.\n\nAs side note, 6 months is also the default campaign timeout period in GA. Perhaps there is a correlation here?\n\n\n  [1]: https://stackoverflow.com/questions/40851315/visitnumber-getting-reset-in-bigquery-export-of-google-analytics\n  [2]: https://plus.google.com/+ConversionworksUk/posts/dbwtAPxFCSL",
    "410619": "Yes. I am aware that its \"2yrs\" after a cookie gets expired. check this visitorid \"096537227179026965\" where a newvisit has been marked even though the time difference between successive visits is less than 6 months (just 1.5 month) . But in this case channel group of the second visit differed from the first one (Referral - Direct) \nSo visit can be considered \"newvisit\" even if the channel group changes? (this is not mentioned as such in official documentation)",
    "410650": "No, I do not think `visitNumber` will be reset due to channel change. The 2nd session of this user does not reset the `visitNumber`, it is the 3rd session which takes place &gt;6 months after the 2nd session that is reset.\n\nIn my work we use GA to track multiple websites, and I can say for sure that by default channel change does not do this. Unless that particular site has some special setting.",
    "410653": "Thanks for clarifying. But for the above visitorid even the second visit is considered as new visit..I am wondering how? Ideally channel change shouldn't be considered as new visit but it's happening here in this dataset.. don't know why",
    "410815": "Wait a sec... seems we are seeing different things - in my memory that visitor has 3 sessions, but only 1st and 3rd have the `newVisits` variable equals 1, the 2nd is 0. Let me check again tomorrow.",
    "411811": "I double-check my data and confirm that for `0196863072768685901`, only the 1st and 3rd sessions (happened on 2016 Sep 30 and 2017 Jul 18) have `totals.newVisit` equals 1, the 2nd session on 2016 Nov 12 has `totals.newVisit` equals to 0. Do you want to double-check on your side too?",
    "411863": "Oops!!  actually i merged train and test datasets. the visitor id has 4 visits overall and 3 new visits. the one with \"non-new\" visit is with less than 6 months time span. I guess u r right \"6 months\" is the span to consider a new visit . Thanks a lot for ur efforts :)",
    "411877": "Glad to help. I learn a new thing too!"
  },
  "source": "meta"
}