DavidWells / DavidWells/analytics
@analytics/aws-pinpoint sending empty string if document.referrer is an empty string
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Description
Noticed that our pinpoint and eventually our analytics data store is sending/storing document.referrer value as "" or EMPTY if it is an empty string here. However, also noticed that Google Analytics does not send a dr (document referrer) value if the string is empty. Therefore, I'm assuming GA is also setting a NULL value for these cases. I think it's ubiquitously known that an empty string means that the visitor went to the site directly. However, doesn't seem to make sense or provide any use in storing an empty string. Here are some screenshots of GA sending a referrer and not sending a referrer when it is an empty string
Referrer value gets sent
Empty string - does not get sent with payload
I can create the PR here shortly for this. Thanks!
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
Start in packages/analytics-plugin-aws-pinpoint/src/browser.js around line 180, where document.referrer is included in the Pinpoint data. Compare the current handling with the reported Google Analytics behavior. Done means an empty document.referrer is not sent or stored as an empty value, while non-empty referrers continue to be sent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100