Multiple gtm containers Recommendation

I would like to know what the recommended way is to include two gtm containers in a nuxt3 project. One of the containers is a serverside tracking container. Do modules like nuxt scripts or nuxt-gtag support serverside tracking at all?
1 Reply
Samuelreichoer
Samuelreichoer2mo ago
I tried it with nuxt-gtag and my config looks like that:
gtag: {
tags: [
// Google Ads Classic
{
id: 'GTM-xxxx',
url: 'https://www.googletagmanager.com',
initCommands: [
[
'consent',
'default',
{
ad_user_data: 'denied',
ad_personalization: 'denied',
ad_storage: 'denied',
analytics_storage: 'denied',
wait_for_update: 500,
},
],
],
},
// Google Ads serverside tracking
{
id: 'GTM-xxxx',
url: 'https://custom-url.com',
initCommands: [
[
'consent',
'default',
{
ad_user_data: 'denied',
ad_personalization: 'denied',
ad_storage: 'denied',
analytics_storage: 'denied',
wait_for_update: 500,
},
],
],
},
],
},
gtag: {
tags: [
// Google Ads Classic
{
id: 'GTM-xxxx',
url: 'https://www.googletagmanager.com',
initCommands: [
[
'consent',
'default',
{
ad_user_data: 'denied',
ad_personalization: 'denied',
ad_storage: 'denied',
analytics_storage: 'denied',
wait_for_update: 500,
},
],
],
},
// Google Ads serverside tracking
{
id: 'GTM-xxxx',
url: 'https://custom-url.com',
initCommands: [
[
'consent',
'default',
{
ad_user_data: 'denied',
ad_personalization: 'denied',
ad_storage: 'denied',
analytics_storage: 'denied',
wait_for_update: 500,
},
],
],
},
],
},
Want results from more Discord servers?
Add your server