snowplow / snowplow/snowplow-javascript-tracker
Pass pre encoded base64 contexts to snowplow javascript api
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 590
- Forks
- 232
- Avg merge
- 2h 22m
- Merged PRs (30d)
- 3
Description
When doing something like
snowplow('trackPageView', null, [ list,of,contexts_jsons ])
We would like to pass the contexts as a base64 instead of letting snowplow do this. That is pre generate the cx variable parameter.
The reasons are because generating JSON and putting that JSON on the HTML page in a script are fairly tricky due to XSS issues. Also the server is much faster at generating base64 than javascript.
Maybe this is already possible (we are using 2.6.2) in the current version but I could not find it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the trackPageView entry point in the JavaScript/TypeScript API and trace how the supplied contexts become the cx parameter. Check the current handling in version 2.6.2 and define the smallest API-compatible way to accept pre-encoded base64 contexts; done means callers can provide that value without client-side JSON generation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- analytics, api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100