@nuxtjs/google-tag-manager
Advanced tools
Comparing version
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.3](https://github.com/nuxt-community/modules/compare/@nuxtjs/google-tag-manager@2.1.2...@nuxtjs/google-tag-manager@2.1.3) (2019-02-12) | ||
**Note:** Version bump only for package @nuxtjs/google-tag-manager | ||
## [2.1.2](https://github.com/nuxt-community/modules/compare/@nuxtjs/google-tag-manager@2.1.1...@nuxtjs/google-tag-manager@2.1.2) (2019-01-11) | ||
@@ -8,0 +16,0 @@ |
@@ -9,2 +9,3 @@ const path = require('path') | ||
pageTracking: false, | ||
respectDoNotTrack: false, | ||
env: {}, // env is supported for backward compability and is alias of query | ||
@@ -11,0 +12,0 @@ query: {} |
{ | ||
"name": "@nuxtjs/google-tag-manager", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"license": "MIT", | ||
@@ -11,3 +11,3 @@ "homepage": "https://github.com/nuxt-community/modules/tree/master/packages/google-tag-manager", | ||
"main": "index.js", | ||
"gitHead": "127300289e6bba6dc7383e28efb6bc110541fba9" | ||
"gitHead": "365c27844da483988b20567dc820f3cc8977a2fc" | ||
} |
@@ -0,1 +1,12 @@ | ||
// Detect Do Not Track settings | ||
<% if (options.respectDoNotTrack) { %> | ||
if ( | ||
window.doNotTrack === '1' | ||
|| navigator.doNotTrack === 'yes' | ||
|| navigator.doNotTrack === '1' | ||
|| navigator.msDoNotTrack === '1' | ||
|| (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) | ||
) return; | ||
<% } %> | ||
// Include Google Tag Manager Script | ||
@@ -2,0 +13,0 @@ window['<%= options.layer %>'] = window['<%= options.layer %>'] || []; |
8867
7.18%71
18.33%