diff --git a/packages/gatsby-plugin-google-tagmanager/README.md b/packages/gatsby-plugin-google-tagmanager/README.md index 2d39aa4818651..7a5b64c666205 100644 --- a/packages/gatsby-plugin-google-tagmanager/README.md +++ b/packages/gatsby-plugin-google-tagmanager/README.md @@ -24,11 +24,6 @@ plugins: [ gtmAuth: "YOUR_GOOGLE_TAGMANAGER_ENVIROMENT_AUTH_STRING", gtmPreview: "YOUR_GOOGLE_TAGMANAGER_ENVIROMENT_PREVIEW_NAME", dataLayerName: "YOUR_DATA_LAYER_NAME", - - // Whether to put the GTM script into the (as suggested by Google) - // or append it to the (making it non-blocking). - // Defaults to false meaning GTM will be added in the (again, as suggested by Google). - addTagInBody: false, }, }, ] diff --git a/packages/gatsby-plugin-google-tagmanager/package.json b/packages/gatsby-plugin-google-tagmanager/package.json index d8b22033c8616..1ccb0a849c8bc 100644 --- a/packages/gatsby-plugin-google-tagmanager/package.json +++ b/packages/gatsby-plugin-google-tagmanager/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-plugin-google-tagmanager", "description": "Gatsby plugin to add google tagmanager onto a site", - "version": "2.1.0", + "version": "2.0.13", "author": "Thijs Koerselman ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" diff --git a/packages/gatsby-plugin-google-tagmanager/src/gatsby-ssr.js b/packages/gatsby-plugin-google-tagmanager/src/gatsby-ssr.js index ef03942a1a448..99bdd060719e7 100644 --- a/packages/gatsby-plugin-google-tagmanager/src/gatsby-ssr.js +++ b/packages/gatsby-plugin-google-tagmanager/src/gatsby-ssr.js @@ -1,8 +1,8 @@ -import { oneLine, stripIndent } from "common-tags" import React from "react" +import { oneLine, stripIndent } from "common-tags" exports.onRenderBody = ( - { setHeadComponents, setPreBodyComponents, setPostBodyComponents }, + { setHeadComponents, setPreBodyComponents }, pluginOptions ) => { if ( @@ -18,10 +18,7 @@ exports.onRenderBody = ( ` : `` - const setComponents = pluginOptions.addTagInBody - ? setPostBodyComponents - : setHeadComponents - setComponents([ + setHeadComponents([