Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Update and fix audiences request

Open
#38 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
analytics

Research direction

Read src/index.ts at line 23 and compare its audience request with the referenced Universal Analytics implementation. Use the Google Tag request details in the issue to identify the GA4 version and parameters that need updating. Done means the managed component sends a valid GA4 audience request using v=2 instead of the legacy v=1 request.

Written by the indexing model from the issue text.

Description

The current audience request for GA4 audiences from this MC does not work and is not a valid request for GA4.

We were using this and seeing 0 data in Google Ads, and Google Ads support noticed we were not sending a request with v=2, which is sent for GA4 audience requests. v=1 is the legacy version associated with (now dead) Universal Analytics.

We see v=1 in this MC,
https://github.com/managed-components/google-analytics-4/blob/a37816ab86a7750cab6ef8546707365e08bde2db/src/index.ts#L23

but the implementation and data structure looks like it was copied from the Universal Analytics MC logic.

If I run the Google Tag, I see a request like this with v2, and different fields:

https://analytics.google.com/g/collect with the following parameters:

  • v=2
  • tid=[Tag ID]
  • gtm=
  • _p=
  • _gaz=
  • gcs=G111 [consent v2]
  • gcd
  • npa
  • dma
  • tag_exp
  • cid
  • ul
  • sr
  • uaa
  • uab
  • uafvl
  • uamb
  • uam
  • uap
  • uapv
  • uaw
  • are
  • pae
  • frm
  • pscdl
  • _s
  • sid
  • sct
  • seg
  • dl
  • en=page_view
  • _ee
  • tfd

There are multiple reports of issues with Zaraz GA4 and audiences in #zaraz Discord.

There's also a request made for https://td.doubleclick.net/td/ga/rul with many params, which isn't part of this MC. Not sure if that's for a different type of tracking though.

Dominant language
TypeScript
Stars
27
Forks
9
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

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.

More from managed-components/google-analytics-4

All issues in managed-components/google-analytics-4

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.