Update and fix audiences request
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
- 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.
More from managed-components/google-analytics-4
-
User ID gets ignoredOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
managed-components/google-analytics-4#40 · 7 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
managed-components/google-analytics-4#39 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
managed-components/google-analytics-4#25 · 1 comment ·
-
Allow setting query parameters without prefix in tool settingsMay be free again @omarmosid claimed this 1111 days ago, and no pull request is open. Open
managed-components/google-analytics-4#24 · 2 comments · 1 assignee ·
All issues in managed-components/google-analytics-4
Similar issues
-
refactor
Difficulty 2/5 Half a day Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OHDSI/Data2Evidence#3450 ·
Maintainers usually reply within 2 days
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 comment ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:ofox
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#8421 ·
Maintainers usually reply within 1 day
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day