taho.xyz
taho.xyz copied to clipboard
Creates UUID, puts into local and sends event to posthog
How to use
Import the Posthog event
import { posthogEvent } from "shared/analytics/posthog";
Call the function where you need events to fire
posthogEvent("Insert your posthog event title here")
Notes
-
This adds the basic functionality to generate a new UUID the first time the user visits the /download/ page which is then put both as a
cookie + localStorage
key entryUUID
. -
Sends
Download page visited
event to posthog -
Checks if UUID already present and if not, creates UUID and puts in storage
Testing
- [ ] Visit
(https://deploy-preview-113--tally-cash.netlify.app/download/)
to generate a UUID - [ ] Check via developer tools
Application > Storage > Cookies >
ifUUID
is present - [ ] Confirm event saved in Posthog
https://app.posthog.com/events
@zuuring any chance we can do this all localStorage
and skip the cookie? What's the downside?
We need further project clarifications before this will deploy ready.
@zuuring any chance we can do this all
localStorage
and skip the cookie? What's the downside?
@mhluongo We looked into this and using localStorage
on the extension side will require us to enable storage
permissions which will flag a permission modal when installing the extension.