{"version":3,"file":"angulartics2.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://angulartics2/angulartics2-config.ts","ng://angulartics2/angulartics2-token.ts","ng://angulartics2/routerless.ts","ng://angulartics2/angulartics2-core.ts","ng://angulartics2/angular-router.ts","ng://angulartics2/angulartics2On.ts","ng://angulartics2/angulartics2.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","export interface GoogleAnalyticsSettings {\n /** array of additional account names (only works for analyticsjs) */\n additionalAccountNames: string[];\n userId: any;\n /** see https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#transport */\n transport: string;\n anonymizeIp: boolean;\n}\n\nexport interface AppInsightsSettings {\n userId: string;\n}\n\nexport interface GoogleTagManagerSettings {\n userId: any;\n}\n\nexport interface GoogleGlobalSiteTagSettings {\n trackingIds: any;\n userId?: any;\n anonymizeIp?: boolean;\n customMap?: { [key: string]: string };\n}\n\nexport interface PageTrackingSettings {\n autoTrackVirtualPages: boolean;\n basePath: string;\n excludedRoutes: (string | RegExp)[];\n /** drop ids from url `/sections/123/pages/456` -> `/sections/pages` */\n clearIds: boolean;\n /** drop contents of url after hash marker `/callback#authcode=1234` -> `/callback` */\n clearHash: boolean;\n /** drop query params from url `/sections/123/pages?param=456¶m2=789` -> `/sections/123/pages` */\n clearQueryParams: boolean;\n /** used with clearIds, define the matcher to clear url parts */\n idsRegExp: RegExp;\n}\n\nexport interface Angulartics2Settings {\n pageTracking: Partial;\n /** Disable page tracking */\n developerMode: boolean;\n ga: Partial;\n appInsights: Partial;\n gtm: Partial;\n gst: Partial;\n}\n\nexport class DefaultConfig implements Angulartics2Settings {\n pageTracking = {\n autoTrackVirtualPages: true,\n basePath: '',\n excludedRoutes: [],\n clearIds: false,\n clearHash: false,\n clearQueryParams: false,\n idsRegExp: /^\\d+$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n };\n developerMode = false;\n ga = {};\n appInsights = {};\n gtm = {};\n gst = {};\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { Angulartics2Settings } from './angulartics2-config';\n\nexport interface Angulartics2Token {\n settings: Partial;\n}\n\nexport const ANGULARTICS2_TOKEN = new InjectionToken('ANGULARTICS2');\n","import { BehaviorSubject, Observable } from 'rxjs';\n\nimport { Angulartics2Settings } from './angulartics2-config';\n\nexport interface TrackNavigationEnd {\n url: string;\n}\n\nexport class RouterlessTracking {\n trackLocation(settings: Angulartics2Settings): Observable {\n return new BehaviorSubject({ url: '/' });\n }\n prepareExternalUrl(url: string): string {\n return url;\n }\n}\n","import { Inject, Injectable } from '@angular/core';\n\nimport { MonoTypeOperatorFunction, ReplaySubject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { Angulartics2Settings, DefaultConfig } from './angulartics2-config';\nimport { EventTrack, PageTrack, UserTimings } from './angulartics2-interfaces';\nimport { Angulartics2Token, ANGULARTICS2_TOKEN } from './angulartics2-token';\nimport { RouterlessTracking, TrackNavigationEnd } from './routerless';\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2 {\n settings: Angulartics2Settings;\n\n pageTrack = new ReplaySubject>(10);\n eventTrack = new ReplaySubject>(10);\n exceptionTrack = new ReplaySubject(10);\n setAlias = new ReplaySubject(10);\n setUsername = new ReplaySubject<{ userId: string | number } | string>(10);\n setUserProperties = new ReplaySubject(10);\n setUserPropertiesOnce = new ReplaySubject(10);\n setSuperProperties = new ReplaySubject(10);\n setSuperPropertiesOnce = new ReplaySubject(10);\n userTimings = new ReplaySubject(10);\n\n constructor(\n private tracker: RouterlessTracking,\n @Inject(ANGULARTICS2_TOKEN) setup: Angulartics2Token,\n ) {\n const defaultConfig = new DefaultConfig();\n this.settings = { ...defaultConfig, ...setup.settings };\n this.settings.pageTracking = {\n ...defaultConfig.pageTracking,\n ...setup.settings.pageTracking,\n };\n this.tracker\n .trackLocation(this.settings)\n .subscribe((event: TrackNavigationEnd) =>\n this.trackUrlChange(event.url),\n );\n }\n\n /** filters all events when developer mode is true */\n filterDeveloperMode(): MonoTypeOperatorFunction {\n return filter((value, index) => !this.settings.developerMode);\n }\n\n protected trackUrlChange(url: string) {\n if (this.settings.pageTracking.autoTrackVirtualPages && !this.matchesExcludedRoute(url)) {\n const clearedUrl = this.clearUrl(url);\n let path: string;\n if (this.settings.pageTracking.basePath.length) {\n path = this.settings.pageTracking.basePath + clearedUrl;\n } else {\n path = this.tracker.prepareExternalUrl(clearedUrl);\n }\n this.pageTrack.next({ path });\n }\n }\n\n /**\n * Use string literals or regular expressions to exclude routes\n * from automatic pageview tracking.\n *\n * @param url location\n */\n protected matchesExcludedRoute(url: string): boolean {\n for (const excludedRoute of this.settings.pageTracking.excludedRoutes) {\n const matchesRegex = excludedRoute instanceof RegExp && excludedRoute.test(url);\n if (matchesRegex || url.indexOf(excludedRoute as string) !== -1) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Removes id's from tracked route.\n * EX: `/project/12981/feature` becomes `/project/feature`\n *\n * @param url current page path\n */\n protected clearUrl(url: string): string {\n if (this.settings.pageTracking.clearIds || this.settings.pageTracking.clearQueryParams ||\n this.settings.pageTracking.clearHash) {\n return url\n .split('/')\n .map(part => this.settings.pageTracking.clearQueryParams ? part.split('?')[0] : part)\n .map(part => this.settings.pageTracking.clearHash ? part.split('#')[0] : part)\n .filter(part => !this.settings.pageTracking.clearIds || !part.match(this.settings.pageTracking.idsRegExp))\n .join('/');\n }\n return url;\n }\n}\n","import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { delay, filter, map } from 'rxjs/operators';\n\nimport { Observable } from 'rxjs';\nimport { RouterlessTracking, TrackNavigationEnd } from './routerless';\n\n/**\n * Track Route changes for applications using Angular's\n * default router\n *\n * @link https://angular.io/api/router/Router\n */\n@Injectable({ providedIn: 'root' })\nexport class AngularRouterTracking implements RouterlessTracking {\n constructor(\n private router: Router,\n private location: Location,\n ) {}\n\n trackLocation(settings): Observable {\n return this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n filter(() => !settings.developerMode),\n map((e: NavigationEnd) => {\n return { url: e.urlAfterRedirects };\n }),\n delay(0),\n );\n }\n\n prepareExternalUrl(url: string): string {\n return this.location.prepareExternalUrl(url);\n }\n}\n","import {\n AfterContentInit,\n Directive,\n ElementRef,\n Input,\n NgModule,\n Renderer2,\n} from '@angular/core';\nimport { Angulartics2 } from './angulartics2-core';\n\n@Directive({ selector: '[angulartics2On]' })\nexport class Angulartics2On implements AfterContentInit {\n // tslint:disable-next-line:no-input-rename\n @Input('angulartics2On') angulartics2On: string;\n @Input() angularticsAction: string;\n @Input() angularticsCategory: string;\n @Input() angularticsLabel: string;\n @Input() angularticsValue: string;\n @Input() angularticsProperties: any = {};\n\n constructor(\n private elRef: ElementRef,\n private angulartics2: Angulartics2,\n private renderer: Renderer2\n ) { }\n\n ngAfterContentInit() {\n this.renderer.listen(\n this.elRef.nativeElement,\n this.angulartics2On || 'click',\n (event: Event) => this.eventTrack(event),\n );\n }\n\n eventTrack(event: Event) {\n const action = this.angularticsAction; // || this.inferEventName();\n const properties: any = {\n ...this.angularticsProperties,\n eventType: event.type,\n };\n\n if (this.angularticsCategory) {\n properties.category = this.angularticsCategory;\n }\n if (this.angularticsLabel) {\n properties.label = this.angularticsLabel;\n }\n if (this.angularticsValue) {\n properties.value = this.angularticsValue;\n }\n\n this.angulartics2.eventTrack.next({\n action,\n properties,\n });\n }\n\n /*private isCommand() {\n return ['a:', 'button:', 'button:button', 'button:submit', 'input:button', 'input:submit'].indexOf(\n getDOM().tagName(this.el).toLowerCase() + ':' + (getDOM().type(this.el) || '')) >= 0;\n }\n\n private inferEventName() {\n if (this.isCommand()) return getDOM().getText(this.el) || getDOM().getValue(this.el);\n return getDOM().getProperty(this.el, 'id') || getDOM().getProperty(this.el, 'name') || getDOM().tagName(this.el);\n }*/\n}\n\n@NgModule({\n declarations: [Angulartics2On],\n exports: [Angulartics2On],\n})\nexport class Angulartics2OnModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { AngularRouterTracking } from './angular-router';\nimport { Angulartics2Settings } from './angulartics2-config';\nimport { Angulartics2 } from './angulartics2-core';\nimport { ANGULARTICS2_TOKEN } from './angulartics2-token';\nimport { Angulartics2On, Angulartics2OnModule } from './angulartics2On';\nimport { RouterlessTracking } from './routerless';\n\n@NgModule({\n imports: [Angulartics2OnModule],\n exports: [Angulartics2On],\n})\nexport class Angulartics2Module {\n static forRoot(\n settings: Partial = {},\n ): ModuleWithProviders {\n return {\n ngModule: Angulartics2Module,\n providers: [\n { provide: ANGULARTICS2_TOKEN, useValue: { settings } },\n { provide: RouterlessTracking, useClass: AngularRouterTracking },\n Angulartics2,\n ],\n };\n }\n}\n"],"names":["InjectionToken","BehaviorSubject","ReplaySubject","filter","tslib_1.__values","Injectable","tslib_1.__param","Inject","NavigationEnd","map","delay","Router","Location","tslib_1.__decorate","Input","Directive","ElementRef","Renderer2","NgModule"],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACA,AAcA;AACA,IAAO,IAAI,QAAQ,GAAG,WAAW;IACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;IACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,E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