@amplitude/plugin-page-view-tracking-browser
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -18,2 +18,3 @@ var _this = this; | ||
var loggerProvider = undefined; | ||
var pushState; | ||
var _a = tslib_1.__read(args, 2), clientOrOptions = _a[0], configOrUndefined = _a[1]; | ||
@@ -52,3 +53,3 @@ if (clientOrOptions && 'init' in clientOrOptions) { | ||
var trackHistoryPageView = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var newURL, _a, _b, _c; | ||
var newURL, shouldTrackPageView, _a, _b, _c; | ||
return tslib_1.__generator(this, function (_d) { | ||
@@ -58,3 +59,9 @@ switch (_d.label) { | ||
newURL = location.href; | ||
if (!((0, exports.shouldTrackHistoryPageView)(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad())) return [3 /*break*/, 4]; | ||
shouldTrackPageView = (0, exports.shouldTrackHistoryPageView)(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad(); | ||
// Note: Update `previousURL` in the same clock tick as `shouldTrackHistoryPageView()` | ||
// This was previously done after `amplitude?.track(await createPageViewEvent());` and | ||
// causes a concurrency issue where app triggers `pushState` twice with the same URL target | ||
// but `previousURL` is only updated after the second `pushState` producing two page viewed events | ||
previousURL = newURL; | ||
if (!shouldTrackPageView) return [3 /*break*/, 4]; | ||
/* istanbul ignore next */ | ||
@@ -74,8 +81,10 @@ loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Tracking page view event'); | ||
_d.label = 4; | ||
case 4: | ||
previousURL = newURL; | ||
return [2 /*return*/]; | ||
case 4: return [2 /*return*/]; | ||
} | ||
}); | ||
}); }; | ||
/* istanbul ignore next */ | ||
var trackHistoryPageViewWrapper = function () { | ||
void trackHistoryPageView(); | ||
}; | ||
var plugin = { | ||
@@ -105,5 +114,6 @@ name: 'page-view-tracking', | ||
/* istanbul ignore next */ | ||
globalScope.addEventListener('popstate', function () { | ||
void trackHistoryPageView(); | ||
}); | ||
globalScope.addEventListener('popstate', trackHistoryPageViewWrapper); | ||
// Save reference to original push state, to be used in teardown | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
pushState = globalScope.history.pushState; | ||
/* istanbul ignore next */ | ||
@@ -151,2 +161,13 @@ // There is no global browser listener for changes to history, so we have | ||
}); }, | ||
teardown: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
if (globalScope) { | ||
globalScope.removeEventListener('popstate', trackHistoryPageViewWrapper); | ||
if (pushState) { | ||
globalScope.history.pushState = pushState; | ||
} | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
}); }, | ||
}; | ||
@@ -153,0 +174,0 @@ // Required for unit tests |
@@ -15,2 +15,3 @@ import { __assign, __awaiter, __generator, __read, __spreadArray } from "tslib"; | ||
var loggerProvider = undefined; | ||
var pushState; | ||
var _a = __read(args, 2), clientOrOptions = _a[0], configOrUndefined = _a[1]; | ||
@@ -49,3 +50,3 @@ if (clientOrOptions && 'init' in clientOrOptions) { | ||
var trackHistoryPageView = function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var newURL, _a, _b, _c; | ||
var newURL, shouldTrackPageView, _a, _b, _c; | ||
return __generator(this, function (_d) { | ||
@@ -55,3 +56,9 @@ switch (_d.label) { | ||
newURL = location.href; | ||
if (!(shouldTrackHistoryPageView(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad())) return [3 /*break*/, 4]; | ||
shouldTrackPageView = shouldTrackHistoryPageView(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad(); | ||
// Note: Update `previousURL` in the same clock tick as `shouldTrackHistoryPageView()` | ||
// This was previously done after `amplitude?.track(await createPageViewEvent());` and | ||
// causes a concurrency issue where app triggers `pushState` twice with the same URL target | ||
// but `previousURL` is only updated after the second `pushState` producing two page viewed events | ||
previousURL = newURL; | ||
if (!shouldTrackPageView) return [3 /*break*/, 4]; | ||
/* istanbul ignore next */ | ||
@@ -71,8 +78,10 @@ loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Tracking page view event'); | ||
_d.label = 4; | ||
case 4: | ||
previousURL = newURL; | ||
return [2 /*return*/]; | ||
case 4: return [2 /*return*/]; | ||
} | ||
}); | ||
}); }; | ||
/* istanbul ignore next */ | ||
var trackHistoryPageViewWrapper = function () { | ||
void trackHistoryPageView(); | ||
}; | ||
var plugin = { | ||
@@ -102,5 +111,6 @@ name: 'page-view-tracking', | ||
/* istanbul ignore next */ | ||
globalScope.addEventListener('popstate', function () { | ||
void trackHistoryPageView(); | ||
}); | ||
globalScope.addEventListener('popstate', trackHistoryPageViewWrapper); | ||
// Save reference to original push state, to be used in teardown | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
pushState = globalScope.history.pushState; | ||
/* istanbul ignore next */ | ||
@@ -148,2 +158,13 @@ // There is no global browser listener for changes to history, so we have | ||
}); }, | ||
teardown: function () { return __awaiter(void 0, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
if (globalScope) { | ||
globalScope.removeEventListener('popstate', trackHistoryPageViewWrapper); | ||
if (pushState) { | ||
globalScope.history.pushState = pushState; | ||
} | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
}); }, | ||
}; | ||
@@ -150,0 +171,0 @@ // Required for unit tests |
@@ -1,1 +0,1 @@ | ||
var pageViewTracking=function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var a,u,c,l,d=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},p=function(){var e,t=d();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=s(n[0]),i=s(n[1]);return i?(e[r]=i,e):e}),{}):{}},s=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},f="dclid",v="fbclid",y="gbraid",g="gclid",m="ko_click_id",h="li_fat_id",_="msclkid",b="rtd_cid",w="ttclid",E="twclid",k="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},O=function(){function e(){}return e.prototype.parse=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=p();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=p();return(e={})[f]=t[f],e[v]=t[v],e[y]=t[y],e[g]=t[g],e[m]=t[m],e[h]=t[h],e[_]=t[_],e[b]=t[b],e[w]=t[w],e[E]=t[E],e[k]=t[k],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(a||(a={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(u||(u={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(c||(c={})),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(l||(l={}));var P=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},N=function(){for(var e,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u={},c=d(),p=void 0,s=i(o,2),f=s[0],v=s[1];f&&"init"in f?(e=f,v&&(u=v)):f&&(u=f);var y=function(){return n(void 0,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return n={event_type:null!==(i=u.eventType)&&void 0!==i?i:"Page View"},e=[{}],[4,R()];case 1:return[2,(n.event_properties=t.apply(void 0,[t.apply(void 0,e.concat([r.sent()])),{page_domain:"undefined"!=typeof location&&location.hostname||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||"",page_title:"undefined"!=typeof document&&document.title||"",page_url:"undefined"!=typeof location&&location.href.split("?")[0]||""}]),n)]}}))}))},g=function(){return void 0===u.trackOn||"function"==typeof u.trackOn&&u.trackOn()},m="undefined"!=typeof location?location.href:null,h=function(){return n(void 0,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return t=location.href,$(u.trackHistoryChanges,t,m||"")&&g()?(null==p||p.log("Tracking page view event"),null!=e?[3,1]:[3,3]):[3,4];case 1:return i=(n=e).track,[4,y()];case 2:i.apply(n,[r.sent()]),r.label=3;case 3:r.label=4;case 4:return m=t,[2]}}))}))},_={name:"page-view-tracking",type:l.ENRICHMENT,setup:function(t,o){return n(void 0,void 0,void 0,(function(){var n,a,l,d,s;return r(this,(function(r){switch(r.label){case 0:return(e=null!=e?e:o)?((p=t.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),u.trackOn=(null===(d=t.attribution)||void 0===d?void 0:d.trackPageViews)?"attribution":u.trackOn,!o&&(null===(s=t.attribution)||void 0===s?void 0:s.trackPageViews)&&(p.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),t.attribution.trackPageViews=!1),u.trackHistoryChanges&&c&&(c.addEventListener("popstate",(function(){h()})),c.history.pushState=new Proxy(c.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],u=r[2];e.apply(t,[o,a,u]),h()}})),g()?(p.log("Tracking page view event"),l=(a=e).track,[4,y()]):[3,2]):(n=f?"Options":"undefined",t.loggerProvider.error("Argument of type '".concat(n,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:l.apply(a,[r.sent()]),r.label=2;case 2:return[2]}}))}))},execute:function(e){return n(void 0,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return"attribution"===u.trackOn&&I(e)?(null==p||p.log("Enriching campaign event to page view event with campaign parameters"),[4,y()]):[3,2];case 1:n=r.sent(),e.event_type=n.event_type,e.event_properties=t(t({},e.event_properties),n.event_properties),r.label=2;case 2:return[2,e]}}))}))}};return _.__trackHistoryPageView=h,_},R=function(){return n(void 0,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return e=P,[4,(new O).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}}))}))},I=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[a.SET]||{},r=t[a.UNSET]||{},u=o(o([],i(Object.keys(n)),!1),i(Object.keys(r)),!1);return Object.keys(T).every((function(e){return u.includes(e)}))}return!1},$=function(e,t,n){return"pathOnly"===e?t.split("?")[0]!==n.split("?")[0]:t!==n},S=Object.freeze({__proto__:null});return e.Types=S,e.pageViewTrackingPlugin=N,e.plugin=N,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
var pageViewTracking=function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var a,u,c,l,d=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},s=function(){var e,t=d();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=p(n[0]),i=p(n[1]);return i?(e[r]=i,e):e}),{}):{}},p=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},f="dclid",v="fbclid",y="gbraid",g="gclid",h="ko_click_id",m="li_fat_id",_="msclkid",b="rtd_cid",w="ttclid",E="twclid",k="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},O=function(){function e(){}return e.prototype.parse=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=s();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=s();return(e={})[f]=t[f],e[v]=t[v],e[y]=t[y],e[g]=t[g],e[h]=t[h],e[m]=t[m],e[_]=t[_],e[b]=t[b],e[w]=t[w],e[E]=t[E],e[k]=t[k],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(a||(a={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(u||(u={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(c||(c={})),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(l||(l={}));var P=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},N=function(){for(var e,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u,c={},s=d(),p=void 0,f=i(o,2),v=f[0],y=f[1];v&&"init"in v?(e=v,y&&(c=y)):v&&(c=v);var g=function(){return n(void 0,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return n={event_type:null!==(i=c.eventType)&&void 0!==i?i:"Page View"},e=[{}],[4,R()];case 1:return[2,(n.event_properties=t.apply(void 0,[t.apply(void 0,e.concat([r.sent()])),{page_domain:"undefined"!=typeof location&&location.hostname||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||"",page_title:"undefined"!=typeof document&&document.title||"",page_url:"undefined"!=typeof location&&location.href.split("?")[0]||""}]),n)]}}))}))},h=function(){return void 0===c.trackOn||"function"==typeof c.trackOn&&c.trackOn()},m="undefined"!=typeof location?location.href:null,_=function(){return n(void 0,void 0,void 0,(function(){var t,n,i,o;return r(this,(function(r){switch(r.label){case 0:return t=location.href,n=$(c.trackHistoryChanges,t,m||"")&&h(),m=t,n?(null==p||p.log("Tracking page view event"),null!=e?[3,1]:[3,3]):[3,4];case 1:return o=(i=e).track,[4,g()];case 2:o.apply(i,[r.sent()]),r.label=3;case 3:r.label=4;case 4:return[2]}}))}))},b=function(){_()},w={name:"page-view-tracking",type:l.ENRICHMENT,setup:function(t,o){return n(void 0,void 0,void 0,(function(){var n,a,l,d,f;return r(this,(function(r){switch(r.label){case 0:return(e=null!=e?e:o)?((p=t.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),c.trackOn=(null===(d=t.attribution)||void 0===d?void 0:d.trackPageViews)?"attribution":c.trackOn,!o&&(null===(f=t.attribution)||void 0===f?void 0:f.trackPageViews)&&(p.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),t.attribution.trackPageViews=!1),c.trackHistoryChanges&&s&&(s.addEventListener("popstate",b),u=s.history.pushState,s.history.pushState=new Proxy(s.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],u=r[2];e.apply(t,[o,a,u]),_()}})),h()?(p.log("Tracking page view event"),l=(a=e).track,[4,g()]):[3,2]):(n=v?"Options":"undefined",t.loggerProvider.error("Argument of type '".concat(n,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:l.apply(a,[r.sent()]),r.label=2;case 2:return[2]}}))}))},execute:function(e){return n(void 0,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return"attribution"===c.trackOn&&I(e)?(null==p||p.log("Enriching campaign event to page view event with campaign parameters"),[4,g()]):[3,2];case 1:n=r.sent(),e.event_type=n.event_type,e.event_properties=t(t({},e.event_properties),n.event_properties),r.label=2;case 2:return[2,e]}}))}))},teardown:function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(e){return s&&(s.removeEventListener("popstate",b),u&&(s.history.pushState=u)),[2]}))}))}};return w.__trackHistoryPageView=_,w},R=function(){return n(void 0,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return e=P,[4,(new O).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}}))}))},I=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[a.SET]||{},r=t[a.UNSET]||{},u=o(o([],i(Object.keys(n)),!1),i(Object.keys(r)),!1);return Object.keys(T).every((function(e){return u.includes(e)}))}return!1},$=function(e,t,n){return"pathOnly"===e?t.split("?")[0]!==n.split("?")[0]:t!==n},S=Object.freeze({__proto__:null});return e.Types=S,e.pageViewTrackingPlugin=N,e.plugin=N,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,(function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var a,u,c,l,d=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},f=function(){var e,t=d();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=p(n[0]),i=p(n[1]);return i?(e[r]=i,e):e}),{}):{}},p=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},s="dclid",v="fbclid",y="gbraid",g="gclid",m="ko_click_id",h="li_fat_id",_="msclkid",b="rtd_cid",w="ttclid",E="twclid",k="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},O=function(){function e(){}return e.prototype.parse=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=f();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=f();return(e={})[s]=t[s],e[v]=t[v],e[y]=t[y],e[g]=t[g],e[m]=t[m],e[h]=t[h],e[_]=t[_],e[b]=t[b],e[w]=t[w],e[E]=t[E],e[k]=t[k],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(a||(a={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(u||(u={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(c||(c={})),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(l||(l={}));var P=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},N=function(){for(var e,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u={},c=d(),f=void 0,p=i(o,2),s=p[0],v=p[1];s&&"init"in s?(e=s,v&&(u=v)):s&&(u=s);var y=function(){return n(void 0,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return n={event_type:null!==(i=u.eventType)&&void 0!==i?i:"Page View"},e=[{}],[4,R()];case 1:return[2,(n.event_properties=t.apply(void 0,[t.apply(void 0,e.concat([r.sent()])),{page_domain:"undefined"!=typeof location&&location.hostname||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||"",page_title:"undefined"!=typeof document&&document.title||"",page_url:"undefined"!=typeof location&&location.href.split("?")[0]||""}]),n)]}}))}))},g=function(){return void 0===u.trackOn||"function"==typeof u.trackOn&&u.trackOn()},m="undefined"!=typeof location?location.href:null,h=function(){return n(void 0,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return t=location.href,$(u.trackHistoryChanges,t,m||"")&&g()?(null==f||f.log("Tracking page view event"),null!=e?[3,1]:[3,3]):[3,4];case 1:return i=(n=e).track,[4,y()];case 2:i.apply(n,[r.sent()]),r.label=3;case 3:r.label=4;case 4:return m=t,[2]}}))}))},_={name:"page-view-tracking",type:l.ENRICHMENT,setup:function(t,o){return n(void 0,void 0,void 0,(function(){var n,a,l,d,p;return r(this,(function(r){switch(r.label){case 0:return(e=null!=e?e:o)?((f=t.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),u.trackOn=(null===(d=t.attribution)||void 0===d?void 0:d.trackPageViews)?"attribution":u.trackOn,!o&&(null===(p=t.attribution)||void 0===p?void 0:p.trackPageViews)&&(f.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),t.attribution.trackPageViews=!1),u.trackHistoryChanges&&c&&(c.addEventListener("popstate",(function(){h()})),c.history.pushState=new Proxy(c.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],u=r[2];e.apply(t,[o,a,u]),h()}})),g()?(f.log("Tracking page view event"),l=(a=e).track,[4,y()]):[3,2]):(n=s?"Options":"undefined",t.loggerProvider.error("Argument of type '".concat(n,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:l.apply(a,[r.sent()]),r.label=2;case 2:return[2]}}))}))},execute:function(e){return n(void 0,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return"attribution"===u.trackOn&&I(e)?(null==f||f.log("Enriching campaign event to page view event with campaign parameters"),[4,y()]):[3,2];case 1:n=r.sent(),e.event_type=n.event_type,e.event_properties=t(t({},e.event_properties),n.event_properties),r.label=2;case 2:return[2,e]}}))}))}};return _.__trackHistoryPageView=h,_},R=function(){return n(void 0,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return e=P,[4,(new O).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}}))}))},I=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[a.SET]||{},r=t[a.UNSET]||{},u=o(o([],i(Object.keys(n)),!1),i(Object.keys(r)),!1);return Object.keys(T).every((function(e){return u.includes(e)}))}return!1},$=function(e,t,n){return"pathOnly"===e?t.split("?")[0]!==n.split("?")[0]:t!==n},S=Object.freeze({__proto__:null});e.Types=S,e.pageViewTrackingPlugin=N,e.plugin=N,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,(function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function r(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var a,u,c,l,d=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},s=function(){var e,t=d();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=f(n[0]),i=f(n[1]);return i?(e[r]=i,e):e}),{}):{}},f=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},p="dclid",v="fbclid",y="gbraid",g="gclid",h="ko_click_id",m="li_fat_id",_="msclkid",b="rtd_cid",w="ttclid",E="twclid",k="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},O=function(){function e(){}return e.prototype.parse=function(){return n(this,void 0,void 0,(function(){return r(this,(function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=s();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=s();return(e={})[p]=t[p],e[v]=t[v],e[y]=t[y],e[g]=t[g],e[h]=t[h],e[m]=t[m],e[_]=t[_],e[b]=t[b],e[w]=t[w],e[E]=t[E],e[k]=t[k],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(a||(a={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(u||(u={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(c||(c={})),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(l||(l={}));var P=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},N=function(){for(var e,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u,c={},s=d(),f=void 0,p=i(o,2),v=p[0],y=p[1];v&&"init"in v?(e=v,y&&(c=y)):v&&(c=v);var g=function(){return n(void 0,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return n={event_type:null!==(i=c.eventType)&&void 0!==i?i:"Page View"},e=[{}],[4,R()];case 1:return[2,(n.event_properties=t.apply(void 0,[t.apply(void 0,e.concat([r.sent()])),{page_domain:"undefined"!=typeof location&&location.hostname||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||"",page_title:"undefined"!=typeof document&&document.title||"",page_url:"undefined"!=typeof location&&location.href.split("?")[0]||""}]),n)]}}))}))},h=function(){return void 0===c.trackOn||"function"==typeof c.trackOn&&c.trackOn()},m="undefined"!=typeof location?location.href:null,_=function(){return n(void 0,void 0,void 0,(function(){var t,n,i,o;return r(this,(function(r){switch(r.label){case 0:return t=location.href,n=$(c.trackHistoryChanges,t,m||"")&&h(),m=t,n?(null==f||f.log("Tracking page view event"),null!=e?[3,1]:[3,3]):[3,4];case 1:return o=(i=e).track,[4,g()];case 2:o.apply(i,[r.sent()]),r.label=3;case 3:r.label=4;case 4:return[2]}}))}))},b=function(){_()},w={name:"page-view-tracking",type:l.ENRICHMENT,setup:function(t,o){return n(void 0,void 0,void 0,(function(){var n,a,l,d,p;return r(this,(function(r){switch(r.label){case 0:return(e=null!=e?e:o)?((f=t.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),c.trackOn=(null===(d=t.attribution)||void 0===d?void 0:d.trackPageViews)?"attribution":c.trackOn,!o&&(null===(p=t.attribution)||void 0===p?void 0:p.trackPageViews)&&(f.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),t.attribution.trackPageViews=!1),c.trackHistoryChanges&&s&&(s.addEventListener("popstate",b),u=s.history.pushState,s.history.pushState=new Proxy(s.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],u=r[2];e.apply(t,[o,a,u]),_()}})),h()?(f.log("Tracking page view event"),l=(a=e).track,[4,g()]):[3,2]):(n=v?"Options":"undefined",t.loggerProvider.error("Argument of type '".concat(n,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:l.apply(a,[r.sent()]),r.label=2;case 2:return[2]}}))}))},execute:function(e){return n(void 0,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return"attribution"===c.trackOn&&I(e)?(null==f||f.log("Enriching campaign event to page view event with campaign parameters"),[4,g()]):[3,2];case 1:n=r.sent(),e.event_type=n.event_type,e.event_properties=t(t({},e.event_properties),n.event_properties),r.label=2;case 2:return[2,e]}}))}))},teardown:function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(e){return s&&(s.removeEventListener("popstate",b),u&&(s.history.pushState=u)),[2]}))}))}};return w.__trackHistoryPageView=_,w},R=function(){return n(void 0,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return e=P,[4,(new O).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}}))}))},I=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[a.SET]||{},r=t[a.UNSET]||{},u=o(o([],i(Object.keys(n)),!1),i(Object.keys(r)),!1);return Object.keys(T).every((function(e){return u.includes(e)}))}return!1},$=function(e,t,n){return"pathOnly"===e?t.split("?")[0]!==n.split("?")[0]:t!==n},S=Object.freeze({__proto__:null});e.Types=S,e.pageViewTrackingPlugin=N,e.plugin=N,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@amplitude/plugin-page-view-tracking-browser", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "", | ||
@@ -40,8 +40,8 @@ "author": "Amplitude Inc", | ||
"dependencies": { | ||
"@amplitude/analytics-client-common": "^1.1.0", | ||
"@amplitude/analytics-types": "^1.3.0", | ||
"@amplitude/analytics-client-common": "^1.1.1", | ||
"@amplitude/analytics-types": "^1.3.1", | ||
"tslib": "^2.4.1" | ||
}, | ||
"devDependencies": { | ||
"@amplitude/analytics-browser": "^1.12.0", | ||
"@amplitude/analytics-browser": "^1.12.1", | ||
"@rollup/plugin-commonjs": "^23.0.4", | ||
@@ -58,3 +58,3 @@ "@rollup/plugin-node-resolve": "^15.0.1", | ||
], | ||
"gitHead": "01c20d61e8c51b59dc7fdf83d4abd57391aecf71" | ||
"gitHead": "bc426d86b020aa96c9dc3a824aaaecf22213b32f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances 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
90472
543
2