segmentio / segmentio/analytics.js-integrations
[google-analytics] Equivalence of ga(set,...) in analytics.js ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 125
- Forks
- 136
- Avg merge
- 2h 45m
- Merged PRs (30d)
- 1
Description
Migrated from #77 by @ferozed
I am porting some ga code to use segment. There are the ga('set', .... ) calls for which I dont see a corresponding version in analytics.
It is not possible to pass in the custom dimensions as properties because they were being set in a different part of the page, and the track/page calls happen elsewhere.
What I am proposing is, we add a Analytics.prototype.set(props) method. The props would be buffered internally. And when users call track or page or identify, the api calls would be merged with those passed in with the set call. This way it would work for all integrations.
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 by locating Analytics.prototype and the existing track, page, and identify implementations. Review how shared properties are currently handled across integrations, then determine whether the proposed set behavior can be specified consistently; done requires an agreed design and coverage for merging buffered properties into those calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100