How does Google Analytics define a new vs returning user?

7,291

ga.js and analytics.js user tracking. The first time a user visits your site, a _ga cookie is set to help distinguish the user. The cookie has a 2 year expiration date from the time it is set.

If the user visits your site within the 2 year period, they will be marked as a returning visitor. On the return visit, the expiration date for the cookie will be updated to be 2 years from the latest visit.

User clears cookies. If a user clears their cookies, they will be marked as a new user on their next visit.

Share:
7,291

Related videos on Youtube

Lokesh Dhakar
Author by

Lokesh Dhakar

Working on Design Systems at Square. Prev web lead at Getaround. Open source projects: Lightbox and Color Thief.

Updated on September 18, 2022

Comments