vercel / next.js

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

Added GTM server side container support to @third-parties/google/gtm #67161

Open guybinya opened 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}/>
ijjk commented 4 days ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

guybinya commented 4 days ago

First PR for me, let me know if I need to add anything :)