Comparing version 1.9.1 to 1.10.0
@@ -563,4 +563,5 @@ function _typeof(obj) { | ||
var optOut$1 = api.optOut; | ||
var refund$1 = api.refund; | ||
export default install; | ||
export { bootstrap, config$1 as config, customMap$1 as customMap, event$1 as event, exception$1 as exception, install, linker$1 as linker, optIn$1 as optIn, optOut$1 as optOut, pageview$1 as pageview, purchase$1 as purchase, query$1 as query, screenview$1 as screenview, set$1 as set, setOptions$1 as setOptions, time$1 as time }; | ||
export { bootstrap, config$1 as config, customMap$1 as customMap, event$1 as event, exception$1 as exception, install, linker$1 as linker, optIn$1 as optIn, optOut$1 as optOut, pageview$1 as pageview, purchase$1 as purchase, query$1 as query, refund$1 as refund, screenview$1 as screenview, set$1 as set, setOptions$1 as setOptions, time$1 as time }; |
@@ -567,2 +567,3 @@ 'use strict'; | ||
var optOut$1 = api.optOut; | ||
var refund$1 = api.refund; | ||
@@ -582,2 +583,3 @@ exports.bootstrap = bootstrap; | ||
exports.query = query$1; | ||
exports.refund = refund$1; | ||
exports.screenview = screenview$1; | ||
@@ -584,0 +586,0 @@ exports.set = set$1; |
@@ -569,2 +569,3 @@ (function (global, factory) { | ||
var optOut$1 = api.optOut; | ||
var refund$1 = api.refund; | ||
@@ -584,2 +585,3 @@ exports.bootstrap = bootstrap; | ||
exports.query = query$1; | ||
exports.refund = refund$1; | ||
exports.screenview = screenview$1; | ||
@@ -586,0 +588,0 @@ exports.set = set$1; |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).VueGtag={})}(this,(function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var a=function(){};function c(e,n){console.error("[vue-gtag] "+e),n&&n.stack&&console.error(n.stack)}function i(e){return e&&"object"===n(e)&&!Array.isArray(e)}function p(){var e,n=j(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)}var u,f,l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=j(),r=o.config,a=o.includes;p.apply(void 0,["config",r.id].concat(n)),Array.isArray(a)&&a.forEach((function(e){p.apply(void 0,["config",e.id].concat(n))}))},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.defaultGroupName,r=t.includes,a=n;r&&null==a.send_to&&(a.send_to=r.map((function(e){return e.id})).concat(o)),p("event",e,a)},s=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n[0],r={};null==(r="string"==typeof o?{page_path:o,page_location:window.location.href}:o).send_page_view&&(r.send_page_view=!0),d("page_view",r)},g=function(){for(var e=j(),n=e.appName,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var a=o[0],c={};null==(c="string"==typeof a?{screen_name:a}:a).app_name&&(c.app_name=n),null==c.send_page_view&&(c.send_page_view=!0),d("screen_view",c)},v=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=j(),t=n.includes,o=n.config;window["ga-disable-".concat(o.id)]=e,Array.isArray(t)&&t.forEach((function(n){window["ga-disable-".concat(n.id)]=e}))},m=function(){v(!0)},y={query:p,config:l,event:d,pageview:s,screenview:g,customMap:function(e){l({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["timing_complete"].concat(n))},exception:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["exception"].concat(n))},linker:function(e){l("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["purchase"].concat(n))},refund:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["refund"].concat(n))},set:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["set"].concat(n))},optIn:function(){v(!1)},optOut:m},w=function(){var e=A();e.$gtag=e.prototype.$gtag=y},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.pageTrackerTemplate,r=t.pageTrackerScreenviewEnabled,a=t.appName,c=o(e,n);return c||(r?{app_name:a,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href})},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.to,t=void 0===n?{}:n,o=e.from,a=void 0===o?{}:o,i=e.params,p=void 0===i?{}:i,u=j(),f=u.pageTrackerSkipSamePath,l=u.pageTrackerScreenviewEnabled;if(!f||t.path!==a.path){var d=r(r({},h(t,a)),p);!l||d.app_name?!l||d.screen_name?l?g(d):s(d):c("To use the screenview, name your routes"):c("To use the screenview, add the appName to the plugin options")}},O=function(){var e=S();e&&function(e){var n=A(),t=j(),o=t.onBeforeTrack,r=t.onAfterTrack,a=t.config;e.onReady((function(t){n.nextTick().then((function(){y.config(a.params),b({to:t})})),e.afterEach((function(e,t){n.nextTick().then((function(){o(e,t),b({to:e,from:t}),r(e,t)}))}))}))}(e)};function _(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=j(),n=e.customResourceURL,t=e.customPreconnectOrigin,o=e.enabled,r=e.globalObjectName,a=e.globalDataLayerName,i=e.config,p=e.pageTrackerEnabled,u=e.onReady,f=e.disableScriptLoad,l=S(),d=Boolean(p&&l);if(o||m(),null==window[r]&&(window[a]=window[a]||[],window[r]=function(){window[a].push(arguments)}),window[r]("js",new Date),d?O():y.config(i.params),!f){var s,g,v="".concat(n,"?id=").concat(i.id,"&l=").concat(a);return(s=v,g=t,new Promise((function(e,n){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");if(o.async=!0,o.src=s,o.charset="utf-8",g){var r=document.createElement("link");r.href=g,r.rel="preconnect",t.appendChild(r)}t.appendChild(o),o.onload=e,o.onerror=n}))).then((function(){var e=window[r];return"function"==typeof u&&u(e),e})).catch((function(e){return c("Ops! Something happened and gtag.js couldn't be loaded",e),e}))}}}var k={customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",globalDataLayerName:"dataLayer",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,pageTrackerSkipSamePath:!0,defaultGroupName:"default",includes:null,appName:null,config:{id:null,params:{send_page_view:!1}}},j=function(){return k},T=function(e){return function e(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];if(!r.length)return n;var c=r.shift();if(i(n)&&i(c)){for(var p in c)i(c[p])?(n[p]||Object.assign(n,t({},p,{})),e(n[p],c[p])):Object.assign(n,t({},p,c[p]));return e.apply(void 0,[n].concat(r))}}(k,e)},A=function(){return u},S=function(){return f};function P(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,T(n),w(),k.bootstrap&&_()}var E=_,N=T,x=y.query,D=y.config,L=y.event,R=y.pageview,B=y.screenview,M=y.customMap,q=y.time,G=y.exception,I=y.linker,C=y.purchase,U=y.set,$=y.optIn,V=y.optOut;e.bootstrap=E,e.config=D,e.customMap=M,e.default=P,e.event=L,e.exception=G,e.install=P,e.linker=I,e.optIn=$,e.optOut=V,e.pageview=R,e.purchase=C,e.query=x,e.screenview=B,e.set=U,e.setOptions=N,e.time=q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).VueGtag={})}(this,(function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var a=function(){};function c(e,n){console.error("[vue-gtag] "+e),n&&n.stack&&console.error(n.stack)}function i(e){return e&&"object"===n(e)&&!Array.isArray(e)}function p(){var e,n=j(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)}var u,f,l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=j(),r=o.config,a=o.includes;p.apply(void 0,["config",r.id].concat(n)),Array.isArray(a)&&a.forEach((function(e){p.apply(void 0,["config",e.id].concat(n))}))},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.defaultGroupName,r=t.includes,a=n;r&&null==a.send_to&&(a.send_to=r.map((function(e){return e.id})).concat(o)),p("event",e,a)},s=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n[0],r={};null==(r="string"==typeof o?{page_path:o,page_location:window.location.href}:o).send_page_view&&(r.send_page_view=!0),d("page_view",r)},g=function(){for(var e=j(),n=e.appName,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var a=o[0],c={};null==(c="string"==typeof a?{screen_name:a}:a).app_name&&(c.app_name=n),null==c.send_page_view&&(c.send_page_view=!0),d("screen_view",c)},v=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=j(),t=n.includes,o=n.config;window["ga-disable-".concat(o.id)]=e,Array.isArray(t)&&t.forEach((function(n){window["ga-disable-".concat(n.id)]=e}))},m=function(){v(!0)},y={query:p,config:l,event:d,pageview:s,screenview:g,customMap:function(e){l({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["timing_complete"].concat(n))},exception:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["exception"].concat(n))},linker:function(e){l("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["purchase"].concat(n))},refund:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["refund"].concat(n))},set:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["set"].concat(n))},optIn:function(){v(!1)},optOut:m},w=function(){var e=A();e.$gtag=e.prototype.$gtag=y},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.pageTrackerTemplate,r=t.pageTrackerScreenviewEnabled,a=t.appName,c=o(e,n);return c||(r?{app_name:a,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href})},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.to,t=void 0===n?{}:n,o=e.from,a=void 0===o?{}:o,i=e.params,p=void 0===i?{}:i,u=j(),f=u.pageTrackerSkipSamePath,l=u.pageTrackerScreenviewEnabled;if(!f||t.path!==a.path){var d=r(r({},h(t,a)),p);!l||d.app_name?!l||d.screen_name?l?g(d):s(d):c("To use the screenview, name your routes"):c("To use the screenview, add the appName to the plugin options")}},O=function(){var e=S();e&&function(e){var n=A(),t=j(),o=t.onBeforeTrack,r=t.onAfterTrack,a=t.config;e.onReady((function(t){n.nextTick().then((function(){y.config(a.params),b({to:t})})),e.afterEach((function(e,t){n.nextTick().then((function(){o(e,t),b({to:e,from:t}),r(e,t)}))}))}))}(e)};function _(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=j(),n=e.customResourceURL,t=e.customPreconnectOrigin,o=e.enabled,r=e.globalObjectName,a=e.globalDataLayerName,i=e.config,p=e.pageTrackerEnabled,u=e.onReady,f=e.disableScriptLoad,l=S(),d=Boolean(p&&l);if(o||m(),null==window[r]&&(window[a]=window[a]||[],window[r]=function(){window[a].push(arguments)}),window[r]("js",new Date),d?O():y.config(i.params),!f){var s,g,v="".concat(n,"?id=").concat(i.id,"&l=").concat(a);return(s=v,g=t,new Promise((function(e,n){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");if(o.async=!0,o.src=s,o.charset="utf-8",g){var r=document.createElement("link");r.href=g,r.rel="preconnect",t.appendChild(r)}t.appendChild(o),o.onload=e,o.onerror=n}))).then((function(){var e=window[r];return"function"==typeof u&&u(e),e})).catch((function(e){return c("Ops! Something happened and gtag.js couldn't be loaded",e),e}))}}}var k={customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",globalDataLayerName:"dataLayer",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,pageTrackerSkipSamePath:!0,defaultGroupName:"default",includes:null,appName:null,config:{id:null,params:{send_page_view:!1}}},j=function(){return k},T=function(e){return function e(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];if(!r.length)return n;var c=r.shift();if(i(n)&&i(c)){for(var p in c)i(c[p])?(n[p]||Object.assign(n,t({},p,{})),e(n[p],c[p])):Object.assign(n,t({},p,c[p]));return e.apply(void 0,[n].concat(r))}}(k,e)},A=function(){return u},S=function(){return f};function P(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,T(n),w(),k.bootstrap&&_()}var E=_,N=T,x=y.query,D=y.config,L=y.event,R=y.pageview,B=y.screenview,M=y.customMap,q=y.time,G=y.exception,I=y.linker,C=y.purchase,U=y.set,$=y.optIn,V=y.optOut,z=y.refund;e.bootstrap=E,e.config=D,e.customMap=M,e.default=P,e.event=L,e.exception=G,e.install=P,e.linker=I,e.optIn=$,e.optOut=V,e.pageview=R,e.purchase=C,e.query=x,e.refund=z,e.screenview=B,e.set=U,e.setOptions=N,e.time=q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=vue-gtag.umd.min.js.map |
{ | ||
"name": "vue-gtag", | ||
"description": "Global Site Tag (gtag.js) plugin for Vue", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Matteo Gabriele", |
@@ -30,2 +30,6 @@ <p align="center"> | ||
## Vue 3 update | ||
Released Vue 3 compatible version on this new repo https://github.com/MatteoGabriele/vue-gtag-next and you can install the package under `vue-gtag-next`. I will release it under the `vue-gtag` package once Vue will officially release version 3 as latest version. | ||
If you have any feedback, please consider opening an issue on https://github.com/MatteoGabriele/vue-gtag-next/issues :pray: | ||
## Requirements | ||
@@ -32,0 +36,0 @@ |
@@ -161,87 +161,101 @@ declare module "vue-gtag" { | ||
export type Dictionary<T> = { [key: string]: T }; | ||
export type GtagOptIO = () => void; | ||
export interface VueGtag { | ||
optIn(): void; | ||
optOut(): void; | ||
/** | ||
* Send a Google Analytics Event. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/events | ||
* | ||
* @param action string that will appear as the event action in Google Analytics Event reports | ||
* @param eventParams | ||
*/ | ||
export type GtagEvent = (action: Gtag.EventNames | string, eventParams?: Gtag.ControlParams | Gtag.EventParams | Gtag.CustomParams) => void; | ||
/** | ||
* Send an ad-hoc Google Analytics pageview. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/pages | ||
*/ | ||
pageview(pageView: PageView): void; | ||
/** | ||
* Send an ad-hoc Google Analytics pageview. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/pages | ||
*/ | ||
export type GtagPageView = (pageView: PageView) => void; | ||
/** | ||
* Send a Google Analytics Event. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/events | ||
* | ||
* @param action string that will appear as the event action in Google Analytics Event reports | ||
* @param eventParams | ||
*/ | ||
event(action: Gtag.EventNames | string, eventParams?: Gtag.ControlParams | Gtag.EventParams | Gtag.CustomParams): void; | ||
/** | ||
* Send a Google Analytics screen view. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/screens | ||
*/ | ||
export type GtagScreenView = (screenView: ScreenView) => void; | ||
/** | ||
* Send a Google Analytics screen view. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/screens | ||
*/ | ||
screenview(screenView: ScreenView): void; | ||
/** | ||
* Configure a map of custom dimensions and metrics. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets | ||
*/ | ||
export type GtagCustomMap = (map: Dictionary<string>) => void; | ||
/** | ||
* Configure a map of custom dimensions and metrics. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets | ||
*/ | ||
customMap(map: Dictionary<string>): void; | ||
/** | ||
* Measure a transaction. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce#measure_purchases | ||
*/ | ||
export type GtagPurchase = (purchase: EcommerceAction) => void; | ||
/** | ||
* Measure a transaction. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce#measure_purchases | ||
*/ | ||
purchase(purchase: EcommerceAction): void; | ||
/** | ||
* Send user timing information to Google Analytics. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings | ||
*/ | ||
export type GtagTime = (timing: Timing) => void; | ||
/** | ||
* Measure a full refund of a transaction. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce#measure_refunds | ||
*/ | ||
refund(refund: EcommerceAction): void; | ||
/** | ||
* Measure an exception. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/exceptions | ||
*/ | ||
export type GtagException = (ex: Exception) => void; | ||
/** | ||
* Automatically link domains. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain#automatically_link_domains | ||
*/ | ||
linker(config: Linker): void; | ||
/** | ||
* Automatically link domains. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain#automatically_link_domains | ||
*/ | ||
export type GtagLinker = (config: Linker) => void; | ||
/** | ||
* Measure an exception. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/exceptions | ||
*/ | ||
exception(ex: Exception): void; | ||
/** | ||
* Set parameters that will be associated with every subsequent event on the page. | ||
* | ||
* @see https://developers.google.com/gtagjs/devguide/configure#send_data_on_every_event_with_set | ||
*/ | ||
export type GtagSet = (config: Gtag.CustomParams) => void; | ||
/** | ||
* Set parameters that will be associated with every subsequent event on the page. | ||
* | ||
* @see https://developers.google.com/gtagjs/devguide/configure#send_data_on_every_event_with_set | ||
*/ | ||
set(config: Gtag.CustomParams): void; | ||
/** | ||
* Initialize and configure settings for a particular product account. | ||
* | ||
* @see https://developers.google.com/gtagjs/devguide/configure | ||
*/ | ||
export type GtagConfig = (config?: Gtag.ControlParams | Gtag.EventParams | Gtag.CustomParams) => void; | ||
/** | ||
* Initialize and configure settings for a particular product account. | ||
* | ||
* @see https://developers.google.com/gtagjs/devguide/configure | ||
*/ | ||
config(config?: Gtag.ControlParams | Gtag.EventParams | Gtag.CustomParams): void; | ||
/** | ||
* Measure a full refund of a transaction. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce#measure_refunds | ||
*/ | ||
export type GtagRefund = (refund: EcommerceAction) => void; | ||
/** | ||
* Send user timing information to Google Analytics. | ||
* | ||
* @see https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings | ||
*/ | ||
time(timing: Timing): void; | ||
export type Dictionary<T> = { [key: string]: T }; | ||
export interface VueGtag { | ||
query: Gtag.Gtag; | ||
optIn: GtagOptIO; | ||
optOut: GtagOptIO; | ||
pageview: GtagPageView; | ||
event: GtagEvent; | ||
screenview: GtagScreenView; | ||
customMap: GtagCustomMap; | ||
purchase: GtagPurchase; | ||
refund: GtagRefund; | ||
linker: GtagLinker; | ||
exception: GtagException; | ||
set: GtagSet; | ||
config: GtagConfig; | ||
time: GtagTime; | ||
} | ||
@@ -283,2 +297,16 @@ | ||
export default VueGtagPlugin; | ||
export const query: Gtag.Gtag; | ||
export const config: GtagConfig; | ||
export const event: GtagEvent; | ||
export const pageview: GtagPageView; | ||
export const screenview: GtagScreenView; | ||
export const customMap: GtagCustomMap; | ||
export const time: GtagTime; | ||
export const exception: GtagException; | ||
export const linker: GtagLinker; | ||
export const purchase: GtagPurchase; | ||
export const set: GtagSet; | ||
export const optIn: GtagOptIO; | ||
export const optOut: GtagOptIO; | ||
export const refund: GtagRefund; | ||
@@ -285,0 +313,0 @@ module "vue/types/vue" { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83588
1744
60