Skip to content

Commit

Permalink
Set tracking prompt cookie age to 365days instead of a session cookie (
Browse files Browse the repository at this point in the history
  • Loading branch information
taranvohra authored Apr 4, 2024
1 parent 36600bc commit 07085a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ async function fetchVisitorID(): Promise<string> {
* Accept or reject cookies.
*/
export function setCookiesTracking(enabled: boolean) {
cookies.set(GRANTED_COOKIE, enabled ? 'yes' : 'no');
cookies.set(GRANTED_COOKIE, enabled ? 'yes' : 'no', {
expires: 365,
});
}

/**
Expand Down

0 comments on commit 07085a5

Please sign in to comment.