DavidWells / DavidWells/analytics

Google analytics has outdated UTM parameters handler

Open
#499 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.