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 44bd72f..9592b45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-gtm", - "version": "3.3.0-vue2", + "version": "3.3.1-vue2", "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[]; -}