Events and conversions
px('track', 'signup', { plan: 'pro' }) // a custom eventpx('conversion', 'trial_started') // a conversionpx('identify', user.id) // an opaque id; only its hash is keptconst visit = px('visitId') // for Stripe metadata; undefined until the script has loadedWith the npm package the same calls are functions: track, conversion, identify, visitId.
Names and properties
Section titled “Names and properties”- Names: letters, digits and
_ . : -, starting with a letter or digit, up to 64 characters. - Up to 32 properties per event: strings (up to 256 characters), numbers or booleans.
nullvalues are dropped. - Never put personal data in names or properties. Emails and long digit runs are replaced with
[redacted]anyway.
Conversions
Section titled “Conversions”A conversion is an event that counts as a goal: it appears in the Conversions total, in the dashboard’s events
panel and in what_changed. Break one down by property with
GET /v1/sites/{id}/stats/events?name=trial_started.
From your backend
Section titled “From your backend”Events that happen on the server (a payment confirmed, a plan changed) can be sent with the server SDK, signed with your key.