Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More →
Socket
Sign inDemoInstall
Socket

@nuxtjs/gtm

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/gtm - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

### [2.2.3](https://github.com/nuxt-community/gtm-module/compare/v2.2.2...v2.2.3) (2020-03-17)
### Bug Fixes
* prepend `router.base` when sending page track events ([#20](https://github.com/nuxt-community/gtm-module/issues/20)) ([2940d85](https://github.com/nuxt-community/gtm-module/commit/2940d8540b813677ffbea81874913cd8c82db50b))
* **module:** warn about head as a function in nuxt config is not supported ([#14](https://github.com/nuxt-community/gtm-module/issues/14)) ([8b37f8d](https://github.com/nuxt-community/gtm-module/commit/8b37f8d7075b0015beb8abbd6ba4a76884e56447))
### [2.2.2](https://github.com/nuxt-community/gtm-module/compare/v2.2.1...v2.2.2) (2020-02-25)

@@ -7,0 +15,0 @@

11

lib/module.js

@@ -54,2 +54,7 @@ const path = require('path')

// Add google tag manager <script> to head
if (typeof this.options.head === 'function') {
// eslint-disable-next-line no-console
console.warn('[@nuxtjs/gtm] head is provided as a function which is not supported by this module at the moment. Removing user-provided head.')
this.options.head = {}
}
this.options.head.script = this.options.head.script || []

@@ -77,2 +82,5 @@ this.options.head.script.push({

// Remove trailing slash to avoid duplicate slashes when appending route path
const routerBase = this.options.router.base.replace(/\/+$/, '')
// Register plugin

@@ -84,3 +92,4 @@ this.addPlugin({

...options,
renderIframe
renderIframe,
routerBase
}

@@ -87,0 +96,0 @@ })

8

lib/plugin.js

@@ -67,7 +67,7 @@ const _layer = '<%= options.layer %>'

pageType: 'PageView',
pageUrl: to.fullPath,
pageTitle: (typeof document !== 'undefined' && document.title) || '',
pageUrl: '<%= options.routerBase %>' + to.fullPath,
pageTitle: (typeof document !== 'undefined' && document.title) || '',
event: '<%= options.pageViewEventName %>'
})
}, 250)
})
}, 250)
})

@@ -74,0 +74,0 @@ }

{
"name": "@nuxtjs/gtm",
"version": "2.2.2",
"version": "2.2.3",
"description": "Google Tag Manager Module for Nuxt.js",

@@ -31,2 +31,3 @@ "repository": "nuxt-community/gtm-module",

"@nuxtjs/module-test-utils": "latest",
"@types/jest": "latest",
"babel-eslint": "latest",

@@ -33,0 +34,0 @@ "babel-jest": "latest",

@@ -67,2 +67,7 @@ # @nuxtjs/gtm

🚨 IMPORTANT 🚨
There is a known issue with Nuxt < 2.12.0 fixed by nuxt/nuxt.js#6807 which causes shared state and adding multiple tags.
Please use `nuxt-edge` for now if want to use `init` on server-side.
There are several use cases that you may need more control over initialization:

@@ -69,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc