Skip to content

Commit

Permalink
fix: add datalayer before gtm snippet (#65)
Browse files Browse the repository at this point in the history
* fix: add datalayer before gtm snippet

* chore: bump version
  • Loading branch information
alinemorelli authored Jul 9, 2020
1 parent 30057f2 commit 796bd19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-gtm-module",
"version": "2.0.8",
"version": "2.0.9",
"description": "React Google Tag Manager Module",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/TagManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const TagManager = {
if (window[dataLayerName]) return window[dataLayerName].push(dataLayer)
const snippets = Snippets.dataLayer(dataLayer, dataLayerName)
const dataScript = this.dataScript(snippets)
document.head.appendChild(dataScript)
document.head.insertBefore(dataScript, document.head.childNodes[0])
}
}

Expand Down

0 comments on commit 796bd19

Please sign in to comment.