Skip to content

remove gtm_preview if not in preview mode #48

@RobertHeim

Description

@RobertHeim

In GTM we can select to only trigger an event in live environment. However, using react-gtm, this event would NOT fire in live environment - I think maybe because react-gtm always adds the gtm_preview parameter?

const gtm_preview = `&gtm_preview=${preview}`

Maybe we can check the paramter for being empty and and if so obmit the param:

const gtm_preview = !preview ? '' : `&gtm_preview=${preview}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions