Closed sin-to-jin closed 3 months ago
I'm trying to set up multiple GTM containers right now, can I do the following?
import { GTMProvider } from '@elgorditosalsero/react-gtm-hook' const App = () => { const gtmParams1 = { id: 'GTM-ID1', dataLayerName: 'customDataLayerName1' } const gtmParams2 = { id: 'GTM-ID2', dataLayerName: 'customDataLayerName2' } return ( <GTMProvider state={gtmParams1}> <GTMProvider state={gtmParams2}> <p>My awesome app</p> </GTMProvider> </GTMProvider> ) }
I thought it would be possible to use multiple containers by specifying each dataLayerName when actually sending the GTM, but can this kind of approach be done with this library?
I'm trying to set up multiple GTM containers right now, can I do the following?
I thought it would be possible to use multiple containers by specifying each dataLayerName when actually sending the GTM, but can this kind of approach be done with this library?