managed-components / managed-components/google-analytics-4

Parsing tag settings from gtag/js for Ga4 integration

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

Nobody has claimed this yet.

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

Description

**Problem description**
Google Analytics 4 (GA4) allows users to define various settings, including ones such as "Define internal traffic", "List unwanted referrals" and "Adjust session timeout" in the GoogleTag settings dialog. These settings are usually evaluated on the client side. They can be accessed using the URL format https://www.googletagmanager.com/gtag/js?id=G-TAGID&cx=c&_slc=1. Currently these settings are not parsed or taken into account.
Not only is this not expected by the user, but some of the resulting issues cannot be worked around in the current implementation. #24

**Suggested Solution**
1) Parse and respect tag settings
To solve this problem, it is necessary to implement a parser that can extract and respect the settings from the above gtag/js URL. These settings play a critical role in fine-tuning the GA4 integration and ensuring accurate tracking and reporting.

2) Provide equivalents in the settings of the component.
Although less intuitive, this would also solve the problem.

Contributor guide

No contributing guide indexed for this repository

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

Start by tracing how this TypeScript component currently handles the Google Tag gtag/js URL, then review the listed GA4 settings such as internal traffic, unwanted referrals, and session timeout. Done means either those settings are parsed and respected or equivalent component settings are provided, with behavior verified against the reported integration problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.