Pageview through createHandler
A pageview as the browser script sends it, with UTM parameters and an email address in the query string, posted to createHandler() with anonymizeIp, stripPii and botFilter enabled. The handler drops the email parameter, adds a daily session ID and detects device, browser and OS from the User-Agent. The IP address is used for the session hash and not stored.
Pageview through createHandler
examples/output/pageview.json{
"headers": {
"content-type": "application/json",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15",
"accept-language": "de-DE,de;q=0.9",
"x-forwarded-for": "203.0.113.42"
},
"body": {
"type": "pageview",
"url": "/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=october&email=jane@example.com",
"referrer": "news.ycombinator.com",
"utm": {
"source": "newsletter",
"medium": "email",
"campaign": "october"
},
"ts": 1791961200000
}
}{
"response": {
"status": 200,
"body": "OK"
},
"stored": [
{
"type": "pageview",
"url": "/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=october",
"referrer": "news.ycombinator.com",
"utm": {
"source": "newsletter",
"medium": "email",
"campaign": "october"
},
"ts": 1791961200000,
"sessionId": "c6c4216a1163582e",
"device": "desktop",
"browser": "Safari",
"os": "macOS"
}
]
}