Is it possible to load self-hosted GoogleTagManager script? #387
Replies: 3 comments 2 replies
|
You can just provide the const { proxy } = useScriptGoogleTagManager({
id: 'YOUR_ID' // id is only needed if you haven't configured globally
}, {
bundle: true
})Checkout the docs here https://scripts.nuxt.com/docs/guides/bundling |
0 replies
|
hi @harlan-zw , if I understand correctly, the requirement of @IdreesSamadi is, we want an option to override the script src here src: withQuery('https://www.googletagmanager.com/gtm.js', {
...
}),so use own self-hosted script 'https://example.com/gtm.js' instead of 'https://www.googletagmanager.com/gtm.js' See other package did: import { createApp } from 'vue';
import { createGtm } from '@gtm-support/vue-gtm';
const app = createApp(App);
app.use(
createGtm({
...
source: 'https://customurl.com/gtm.js', // Add your own serverside GTM script
...
})
) |
2 replies
|
You can override the source via useScriptGoogleTagManager(
{ id: 'GTM-XXX' },
{ scriptInput: { src: 'https://example.com/gtm.js' } }
)The proxy + |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Some of the other analytics Umami and Matomo allow you to load the self-hosted versions. Is this possible for Google Tag Manager?
I am self-hosting the Google Tag Manager, and want to provide the URL to
useScriptGoogleTagManager. Something like the following:All reactions