From 70131e5c3136cfba375cb41ac00335d63c2b201a Mon Sep 17 00:00:00 2001 From: Shinigami92 Date: Mon, 25 Jan 2021 18:02:46 +0100 Subject: [PATCH] Hotfix for dataLayer --- CHANGELOG.md | 8 +++++++- package.json | 2 +- src/plugin.ts | 10 ++++++++++ src/window.d.ts | 7 ------- 4 files changed, 18 insertions(+), 9 deletions(-) delete mode 100644 src/window.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 8737b7c..291c3f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Next -[diff](https://github.com/mib200/vue-gtm/compare/3.3.0...master) +[diff](https://github.com/mib200/vue-gtm/compare/3.3.1...master) + +# 3.3.1 + +[diff](https://github.com/mib200/vue-gtm/compare/3.3.0...3.3.1) + +- Hotfix for `dataLayer` # 3.3.0 diff --git a/package.json b/package.json index 3680316..984483a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-gtm", - "version": "3.3.0", + "version": "3.3.1", "description": "Google Tag Manager implementation in Vue application", "main": "dist/index.js", "author": { diff --git a/src/plugin.ts b/src/plugin.ts index 2f3196d..d0230bb 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,6 +1,16 @@ import pluginConfig, { VueGtmContainer } from "./config"; import { hasScript, loadScript, logDebug } from "./utils"; +export interface DataLayerObject extends Record { + event: string; +} + +declare global { + interface Window { + dataLayer?: DataLayerObject[]; + } +} + const inBrowser: boolean = typeof window !== "undefined"; export interface VueGtmTrackEventParams { diff --git a/src/window.d.ts b/src/window.d.ts deleted file mode 100644 index d31a5ff..0000000 --- a/src/window.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface DataLayerObject extends Record { - event: string; -} - -declare interface Window { - dataLayer?: DataLayerObject[]; -}