segmentio / segmentio/analytics.js-integrations
[heap] There is no any possibility to turn off heap.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 125
- Forks
- 136
- Avg merge
- 2h 45m
- Merged PRs (30d)
- 1
Description
Migrated from #16 by @HovhannesB
#Details
Recently I had a problem with turning off the heap. If you load the lib with analytics.js there is no any possibility to turn it off. The only solution is to refresh the browser page and not to load the heap. In the case of single page applications refreshing the browser window is not the best idea.
I tried analytics.reset, analytics.off, analytics.integrations.heap.off.
By examining code it turned out that anonymous functions are set on event listeners and JS doesn't give you any opportunity to turn them off.
#Expected result
Adding a function like heap.shutDown(), that stops heap.
Contributor guide
No contributing guide indexed for this repository
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 with the Heap integration and the existing analytics.reset, analytics.off, and analytics.integrations.heap.off entry points. Trace how its event listeners are registered and determine the shutdown behavior needed for a single-page application. Done means Heap can be stopped without refreshing the page, with the relevant behavior covered by tests if the integration has them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100