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

Additional Config Support #727

Open
sambrannon opened this issue Jun 12, 2024 · 0 comments
Open

Additional Config Support #727

sambrannon opened this issue Jun 12, 2024 · 0 comments

Comments

@sambrannon
Copy link

sambrannon commented Jun 12, 2024

Hey there @MauricioRobayo 👋🏻

I ran into a situation where passing in additional gtag config options was helpful (specifically, adding server_container_url for Server-Side tagging). I wasn't seemingly able to do so out of the box with this package.

Any interest in a PR that would allow for this? I spiked out a barebones change that I think does the trick.

Notes

  1. It exposes a new additionalConfig prop on the <GoogleAnalytics /> component that accepts all the same options as the @types/gtag.js package (which also allows for any custom tags, which confusingly server_container_url is 🤔)
  2. The current approach feels more "one prop per config option", which is much simpler and nice, but this would allow for additional flexibility. Can see both sides. Any thoughts?
  3. NextJS' 3rd-party script doesn't have any passable config options, maybe there's a different way to do all this?

In-Editor typeahead experience:

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant