TelemetryDeck / WebSDK

Add TelemetryDeck to your website or blog
Other
3 stars 2 forks source link

Send Request to nom #1

Closed winsmith closed 1 year ago

winsmith commented 1 year ago

Send request to https://nom.telemetrydeck.com/v2/w/ with the payload below. The ingest API will try to determine as much as possible from the request itself and only needs a bit of additional data.

Depends on https://github.com/TelemetryDeck/ingest/issues/45

application/json

{
    "appID": "<app_id, required>",
    "type": "<string or leave undefined for 'pageView'>", 
    "url": "<window.location.href, required>",
    "payload": <dict, optional>,
    "referrer": "<url, optional>"
}
### Tasks
- [x] Configure via `data-app-id` property in script tag
- [x] automatically send page view signals
- [x] include the referrer