vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.59k stars 26.23k forks source link

GTM server side container support added to @third-parties/google #67160

Closed guybinya closed 4 days ago

guybinya commented 4 days ago

What?

Added support for server side container to GTM third parties script

Why?

Allows users to take advantage of the @third-parties library when using a gtm server side container for tracking.

How?

Added a new prop to GTMParams called serverSideContainerUrl with a default url for the regular tag manager.

New usage will look like:

<GoogleTagManager gtmId={gtmId} serverSideContainerUrl={GOOGLE_TAG_MANAGER_URL}/>