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

Cannot use vueRouterAdditionalEventData option #27

Open
dovca opened this issue Mar 19, 2024 · 1 comment
Open

Cannot use vueRouterAdditionalEventData option #27

dovca opened this issue Mar 19, 2024 · 1 comment

Comments

@dovca
Copy link

dovca commented Mar 19, 2024

It is currently impossible to use the vueRouterAdditionalEventData option, because it is stored in public runtime config by the plugin and removed during serialization for the client bundle (see https://nuxt.com/docs/guide/going-further/runtime-config#serialization)

Reproduction:

// nuxt.config.ts

gtm: {
  vueRouterAdditionalEventData: () => ({foo: 'bar'});
}

Result:

The additional data is not added to the trackView event payload

@AdrianFahrbach
Copy link

Got the same issue. Any updates on this?

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

2 participants