Skip to content

Cannot use vueRouterAdditionalEventData option #27

@dovca

Description

@dovca

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions