{"version":3,"file":"angulartics2-gst.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","ng://angulartics2/gst/gst.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","import { Injectable } from '@angular/core';\n\nimport { Angulartics2, GoogleGlobalSiteTagSettings, UserTimings } from 'angulartics2';\nimport { EventGst, UserTimingsGst } from './gst-interfaces';\n\ndeclare var gtag: any;\ndeclare var ga: any;\n\nexport class GoogleGlobalSiteTagDefaults implements GoogleGlobalSiteTagSettings {\n trackingIds: string[] = [];\n\n constructor() {\n if (typeof ga !== 'undefined' && ga) {\n // See: https://developers.google.com/analytics/devguides/collection/analyticsjs/ga-object-methods-reference\n ga(() => {\n ga.getAll().forEach((tracker: any) => {\n const id = tracker.get('trackingId');\n // If set both in forRoot and HTML page, we want to avoid duplicates\n if (id !== undefined && this.trackingIds.indexOf(id) === -1) {\n this.trackingIds.push(id);\n }\n });\n });\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2GoogleGlobalSiteTag {\n private dimensionsAndMetrics: { [key: string]: any } = {};\n\n constructor(protected angulartics2: Angulartics2) {\n const defaults = new GoogleGlobalSiteTagDefaults();\n // Set the default settings for this module\n this.angulartics2.settings.gst = { ...defaults, ...this.angulartics2.settings.gst };\n }\n\n startTracking(): void {\n this.angulartics2.pageTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.pageTrack(x.path));\n this.angulartics2.eventTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.eventTrack(x.action, x.properties));\n this.angulartics2.exceptionTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x: any) => this.exceptionTrack(x));\n this.angulartics2.userTimings\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe(x => this.userTimings(this.convertTimings(x)));\n this.angulartics2.setUsername\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x: string) => this.setUsername(x));\n this.angulartics2.setUserProperties\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x: any) => this.setUserProperties(x));\n }\n\n /**\n * Manually track page view, see:\n *\n * https://developers.google.com/analytics/devguides/collection/gtagjs/single-page-applications#tracking_virtual_pageviews\n *\n * @param path relative url\n */\n pageTrack(path: string) {\n if (typeof gtag !== 'undefined' && gtag) {\n const params: any = {\n page_path: path,\n page_location: window.location.protocol + '//' + window.location.host + path,\n ...this.dimensionsAndMetrics\n };\n\n // Custom map must be reset with all config to stay valid.\n\n if (this.angulartics2.settings.gst.customMap) {\n params.custom_map = this.angulartics2.settings.gst.customMap;\n }\n if (this.angulartics2.settings.gst.userId) {\n params.user_id = this.angulartics2.settings.gst.userId;\n }\n if (this.angulartics2.settings.gst.anonymizeIp) {\n params.anonymize_ip = this.angulartics2.settings.gst.anonymizeIp;\n }\n\n for (const id of this.angulartics2.settings.gst.trackingIds) {\n gtag('config', id, params);\n }\n }\n }\n\n /**\n * Send interactions to gtag, i.e. for event tracking in Google Analytics. See:\n *\n * https://developers.google.com/analytics/devguides/collection/gtagjs/events\n *\n * @param action associated with the event\n */\n eventTrack(action: string, properties: Partial = {}) {\n this.eventTrackInternal(action, {\n event_category: properties.category || 'interaction',\n event_label: properties.label,\n value: properties.value,\n non_interaction: properties.noninteraction,\n ...properties.gstCustom\n });\n }\n\n /**\n * Exception Track Event in GST. See:\n *\n * https://developers.google.com/analytics/devguides/collection/gtagjs/exceptions\n *\n */\n exceptionTrack(properties: any) {\n // TODO: make interface\n // @param {Object} properties\n // @param {string} [properties.description]\n // @param {boolean} [properties.fatal]\n if (properties.fatal === undefined) {\n console.log('No \"fatal\" provided, sending with fatal=true');\n properties.fatal = true;\n }\n\n properties.exDescription = properties.event ? properties.event.stack : properties.description;\n\n this.eventTrack('exception', {\n gstCustom: {\n description: properties.exDescription,\n fatal: properties.fatal,\n ...properties.gstCustom\n }\n });\n }\n\n /**\n * User Timings Event in GST.\n *\n * @param properties Comprised of the mandatory fields:\n * - name (string)\n * - value (number - integer)\n * Properties can also have the optional fields:\n * - category (string)\n * - label (string)\n *\n * @link https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings\n */\n userTimings(properties: UserTimingsGst) {\n if (!properties) {\n console.error('User timings - \"properties\" parameter is required to be set.');\n return;\n }\n\n this.eventTrackInternal('timing_complete', {\n name: properties.name,\n value: properties.value,\n event_category: properties.category,\n event_label: properties.label\n });\n }\n\n private convertTimings(properties: UserTimings): UserTimingsGst {\n return {\n name: properties.timingVar,\n value: properties.timingValue,\n category: properties.timingCategory,\n label: properties.timingLabel\n };\n }\n\n setUsername(userId: string | { userId: string | number }) {\n this.angulartics2.settings.gst.userId = userId;\n if (typeof gtag !== 'undefined' && gtag) {\n gtag('set', { user_id: typeof userId === 'string' || !userId ? userId : userId.userId });\n }\n }\n\n setUserProperties(properties: any) {\n this.setDimensionsAndMetrics(properties);\n }\n\n private setDimensionsAndMetrics(properties: { [key: string]: any }) {\n // We want the dimensions and metrics to accumulate, so we merge with previous value\n this.dimensionsAndMetrics = {\n ...this.dimensionsAndMetrics,\n ...properties\n };\n\n // Remove properties that are null or undefined\n Object.keys(this.dimensionsAndMetrics).forEach(key => {\n const val = this.dimensionsAndMetrics[key];\n if (val === undefined || val === null) {\n delete this.dimensionsAndMetrics[key];\n }\n });\n\n if (typeof gtag !== 'undefined' && gtag) {\n gtag('set', this.dimensionsAndMetrics);\n }\n }\n\n private eventTrackInternal(action: string, properties: any = {}) {\n this.cleanProperties(properties);\n if (typeof gtag !== 'undefined' && gtag) {\n gtag('event', action, properties);\n }\n }\n\n private cleanProperties(properties: { [key: string]: any }): void {\n // GA requires that eventValue be an non-negative integer, see:\n // https://developers.google.com/analytics/devguides/collection/gtagjs/events\n if (properties.value) {\n const parsed = parseInt(properties.value, 10);\n properties.value = isNaN(parsed) ? 0 : parsed;\n }\n }\n}\n"],"names":["tslib_1.__values","Injectable","Angulartics2"],"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,EAAE,EAAE;IAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC7B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,SAAS;IACT,QAAQ,OAAO,CAAC,CAAC;IACjB,MAAK;IACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3C,EAAC;AACD,AAUA;AACA,IAAO,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC1D,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAA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