Is it possible to load self-hosted GoogleTagManager script? #387
Unanswered
IdreesSamadi
asked this question in
Q&A
Replies: 2 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 |
Beta Was this translation helpful? Give feedback.
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
...
})
) |
Beta Was this translation helpful? Give feedback.
2 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:Beta Was this translation helpful? Give feedback.
All reactions