DavidWells / DavidWells/analytics
Google analytics has outdated UTM parameters handler
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
For anyone who is using / going to use GA4 plugin:
https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-google-analytics/src/browser.js#L284
This object should be replaced with the following (underscore instead of camelCase):
if (id) campaign.campaign_id = id
if (name) campaign.campaign_name = name
if (source) campaign.campaign_source = source
if (medium) campaign.campaign_medium = medium
if (content) campaign.campaign_content = content
if (keyword) campaign.campaign_keyword = keyword
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
Open packages/analytics-plugin-google-analytics/src/browser.js around line 284 and inspect the UTM campaign parameter handling. Replace the camelCase campaign keys with the underscore-form keys listed in the issue, then verify that the GA4 plugin uses the requested parameter names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100