From 56cb078fa6475c5570b1079436f7791c907f1b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Tr=C3=A9guier?= Date: Sat, 13 Jul 2019 21:24:30 +0200 Subject: [PATCH] fix(google-tag-manager): fix respectDoNotTrack (#295) --- packages/google-tag-manager/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-tag-manager/plugin.js b/packages/google-tag-manager/plugin.js index fec2a2f6..bccf66e7 100644 --- a/packages/google-tag-manager/plugin.js +++ b/packages/google-tag-manager/plugin.js @@ -13,7 +13,7 @@ class GTM { 'gtm.start': new Date().getTime() }) - if (!this.options.respectDoNotTrack && this.options.pageTracking && !this.hasDNT()) { + if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { this.initPageTracking() } }