Navigator Prefabricating Marinates

    @info.nl/react-google-tagmanager

    0.0.1 • Public • Published

    react-google-tagmanager npm version

    Google Tag Manager code strings for React server page templates.

    Installation

    $ npm i @info.nl/react-google-tagmanager -S
    

    Usage

    import reactGoogleTagmanager from "react-google-tagmanager";
    
    class Html extends Component {
      render() {
        const tagmanager = reactGoogleTagmanager(
          process.env.GOOGLE_TAGMANAGER_ID, 
          'myLayer'
        );
    
        return (
          <html>
            ...
            <body>
              <noscript
                dangerouslySetInnerHTML={{__html: tagmanager.noscript}}
                ></noscript>
              <script
                dangerouslySetInnerHTML={{__html: tagmanager.script}}
                ></script>
              ...
            </body>
          </html>
        )
      }
    }
    

    License

    MIT

    Keywords

    Install

    npm i @info.nl/react-google-tagmanager

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • admin.info.nl