devangrose / pamneighbors

0 stars 1 forks source link

Insert google tag manager into app #1

Closed devangrose closed 5 years ago

devangrose commented 5 years ago

Check out https://www.npmjs.com/package/react-gtm-module

Add

import TagManager from 'react-gtm-module'

to imports in src/App.js


Add

const tagManagerArgs = {
    gtmId: 'GTM-000000',
    auth: '6sBOnZx1hqPcO01xPOytLK',
    preview: 'env-2'
}

TagManager.initialize(tagManagerArgs)

below imports but above app component stuff

ryangrose commented 5 years ago

Added in branch https://github.com/devangrose/pamneighbors/tree/google-tag-manager