Utilizing the following npm package: https://www.npmjs.com/package/vue-gtm
Within my router.js file (using vue cli 3), I am attempting to connect it to a router instance:
import Vue from 'vue'
import Router from 'vue-router'
import VueGtm from 'vue-gtm'
Vue.use(VueGtm, {
id: 'GTM-xxxxxxx',
enabled: true,
debug: true,
vueRouter: Router
})
export default new Router({
mode: 'history'
})
However, it is evident that this approach will not function as intended. How can I properly link vue-gtm to a Router in my scenario, where I export the Router instance without assigning it to a variable?
const router = new Router({})