Skip to content

GoogleTagManager: custom gtm.js source #152

@endorfin

Description

@endorfin

Describe the feature

In one of our client projects we use a self hosted GoogleTagManager Instance + Matomo (GDPR).
So we need the possibility to specify a custom source for the gtm.js script.

  scripts: {
    registry: {
      googleTagManager: {
        url: 'https://analytics.domain-xyz.de/gtm.js',
        id: 'GTM-123456'
      }
    }
  },

Additional information

just a quick idea for implementation ... tpc/utils.ts:98

src: withQuery('${mainScript.params?.url || mainScript.url}', {${mainScript.params?.filter(p => p !== 'url').map(p => `${p}: options?.${p}`)}})

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