Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to override default parameters #43

Open
Tombarr opened this issue Apr 9, 2023 · 0 comments
Open

Unable to override default parameters #43

Tombarr opened this issue Apr 9, 2023 · 0 comments
Labels
enhancement New feature or request ga4

Comments

@Tombarr
Copy link

Tombarr commented Apr 9, 2023

I'm testing out @minimal-analytics/ga4 on KaiOS apps but I'm running into an issue with because package apps are served with an origin like app:https://myapp.com/. The document location includes the app: protocol, and Google Analytics appears to discard the page path (but not page title) as a result. In Universal Analytics, I replaced the app: protocol with https: and it worked well.

Looking at getQueryParams, the event parameters are concatenated with the default parameters. If I pass { dl: 'https://myapp.com/index.html' }, it sends two dl parameters because of the behavior of URLSearchParams.

Would you consider changing the behavior to allow overriding default parameter values? This should be a non-breaking change, since anyone attempting to override default parameters now would have a bad request anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ga4
Projects
None yet
Development

No branches or pull requests

2 participants