{"version":3,"file":"ngx-matomo-tracker.mjs","sources":["../../../projects/tracker/src/lib/coercion.ts","../../../projects/tracker/src/lib/configuration.ts","../../../projects/tracker/src/lib/holder.ts","../../../projects/tracker/src/lib/matomo-tracker.service.ts","../../../projects/tracker/src/lib/directives/matomo-opt-out-form.component.ts","../../../projects/tracker/src/lib/directives/matomo-opt-out-form.component.html","../../../projects/tracker/src/lib/directives/matomo-track-click.directive.ts","../../../projects/tracker/src/lib/directives/matomo-tracker.directive.ts","../../../projects/tracker/src/lib/script-factory.ts","../../../projects/tracker/src/lib/errors.ts","../../../projects/tracker/src/lib/matomo-initializer.service.ts","../../../projects/tracker/src/lib/ngx-matomo-tracker.module.ts","../../../projects/tracker/src/public-api.ts","../../../projects/tracker/src/ngx-matomo-tracker.ts"],"sourcesContent":["export type CssSizeInput = string | number | null | undefined;\n\nexport function requireNonNull<T>(value: T | null | undefined, message: string): T {\n  if (value === null || value === undefined) {\n    throw new Error('Unexpected ' + value + ' value: ' + message);\n  }\n\n  return value;\n}\n\n/** Coerce a data-bound value to a boolean */\nexport function coerceCssSizeBinding(value: CssSizeInput): string {\n  if (value == null) {\n    return '';\n  }\n\n  return typeof value === 'string' ? value : `${value}px`;\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport { requireNonNull } from './coercion';\n\nconst CONFIG_NOT_FOUND =\n  'No Matomo configuration found! Have you included Matomo module using NgxMatomoTrackerModule.forRoot() ?';\n\n/** Injection token for {@link MatomoConfiguration} */\nexport const MATOMO_CONFIGURATION = new InjectionToken<MatomoConfiguration>('MATOMO_CONFIGURATION');\n\n/**\n * For internal use only. Injection token for {@link InternalMatomoConfiguration}\n *\n */\nexport const INTERNAL_MATOMO_CONFIGURATION = new InjectionToken<InternalMatomoConfiguration>(\n  'INTERNAL_MATOMO_CONFIGURATION',\n  {\n    factory: () =>\n      ({\n        disabled: false,\n        enableLinkTracking: true,\n        trackAppInitialLoad: false,\n        requireConsent: MatomoConsentMode.NONE,\n        enableJSErrorTracking: false,\n        runOutsideAngularZone: false,\n        ...requireNonNull(inject(MATOMO_CONFIGURATION, { optional: true }), CONFIG_NOT_FOUND),\n      } as InternalMatomoConfiguration),\n  }\n);\n\n/**\n * For internal use only. Module configuration merged with default values.\n *\n */\nexport type InternalMatomoConfiguration = MatomoConfiguration & Required<BaseMatomoConfiguration>;\n\nexport enum MatomoInitializationMode {\n  /** Automatically inject matomo script using provided configuration */\n  AUTO,\n  /** Do not inject Matomo script. In this case, initialization script must be provided */\n  MANUAL,\n  /**\n   * Automatically inject matomo script when deferred tracker configuration is provided using `MatomoDeferredInitializerService.init`.\n   */\n  AUTO_DEFERRED,\n}\n\nexport enum MatomoConsentMode {\n  /** Do not require any consent, always track users */\n  NONE,\n  /** Require cookie consent */\n  COOKIE,\n  /** Require tracking consent */\n  TRACKING,\n}\n\nexport interface MatomoTrackerConfiguration {\n  /** Matomo site id */\n  siteId: number | string;\n\n  /** Matomo server url */\n  trackerUrl: string;\n\n  /** The trackerUrlSuffix is always appended to the trackerUrl. It defaults to matomo.php */\n  trackerUrlSuffix?: string;\n}\n\nexport interface MultiTrackersConfiguration {\n  /**\n   * Configure multiple tracking servers. <b>Order matters: if no custom script url is\n   * provided, Matomo script will be downloaded from first tracker.</b>\n   */\n  trackers: MatomoTrackerConfiguration[];\n}\n\nexport interface BaseMatomoConfiguration {\n  /** Set to `true` to disable tracking */\n  disabled?: boolean;\n\n  /** If `true`, track a page view when app loads (default `false`) */\n  trackAppInitialLoad?: boolean;\n\n  /**\n   * Set to `false` to disable this Matomo feature (default `true`).\n   * Used when {@link trackAppInitialLoad} is `true` and by Router module.\n   */\n  enableLinkTracking?: boolean;\n\n  /** Set to `true` to not track users who opt out of tracking using <i>Do Not Track</i> setting */\n  acceptDoNotTrack?: boolean;\n\n  /**\n   * Configure user consent requirement\n   *\n   * To identify whether you need to ask for any consent, you need to determine whether your lawful\n   * basis for processing personal data is \"Consent\" or \"Legitimate interest\", or whether you can\n   * avoid collecting personal data altogether.\n   *\n   * Matomo differentiates between cookie and tracking consent:\n   * - In the context of <b>tracking consent</b> no cookies will be used and no tracking request\n   *   will be sent unless consent was given. As soon as consent was given, tracking requests will\n   *   be sent and cookies will be used.\n   * - In the context of <b>cookie consent</b> tracking requests will always be sent. However,\n   *   cookies will be only used if consent for storing and using cookies was given by the user.\n   *\n   * Note that cookies impact reports accuracy.\n   *\n   * See Matomo guide: {@link https://developer.matomo.org/guides/tracking-consent}\n   */\n  requireConsent?: MatomoConsentMode;\n\n  /** Set to `true` to enable Javascript errors tracking as <i>events</i> (with category <i>JavaScript Errors</i>) */\n  enableJSErrorTracking?: boolean;\n\n  /** Set to `true` to run matomo calls outside of angular NgZone. This may fix angular freezes. */\n  runOutsideAngularZone?: boolean;\n}\n\nexport interface BaseAutoMatomoConfiguration<\n  M extends\n    | MatomoInitializationMode.AUTO\n    | MatomoInitializationMode.AUTO_DEFERRED = MatomoInitializationMode.AUTO\n> {\n  /**\n   * Set the script initialization mode (default is `AUTO`)\n   *\n   */\n  mode?: M;\n\n  /** Matomo script url (default is `matomo.js` appended to main tracker url) */\n  scriptUrl: string;\n}\n\ntype Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };\ntype XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;\ntype XOR3<T, U, V> = XOR<T, XOR<U, V>>;\n\nexport type ManualMatomoConfiguration = {\n  /**\n   * Set the script initialization mode (default is `AUTO`)\n   *\n   */\n  mode: MatomoInitializationMode.MANUAL;\n};\n\nexport type DeferredMatomoConfiguration = {\n  /**\n   * Set the script initialization mode (default is `AUTO`)\n   *\n   */\n  mode: MatomoInitializationMode.AUTO_DEFERRED;\n};\n\nexport type ExplicitAutoConfiguration<\n  M extends\n    | MatomoInitializationMode.AUTO\n    | MatomoInitializationMode.AUTO_DEFERRED = MatomoInitializationMode.AUTO\n> = Partial<BaseAutoMatomoConfiguration<M>> &\n  XOR<MatomoTrackerConfiguration, MultiTrackersConfiguration>;\nexport type EmbeddedAutoConfiguration<\n  M extends\n    | MatomoInitializationMode.AUTO\n    | MatomoInitializationMode.AUTO_DEFERRED = MatomoInitializationMode.AUTO\n> = BaseAutoMatomoConfiguration<M> & Partial<MultiTrackersConfiguration>;\n\nexport type AutoMatomoConfiguration<\n  M extends\n    | MatomoInitializationMode.AUTO\n    | MatomoInitializationMode.AUTO_DEFERRED = MatomoInitializationMode.AUTO\n> = XOR<ExplicitAutoConfiguration<M>, EmbeddedAutoConfiguration<M>>;\n\nexport type MatomoConfiguration = BaseMatomoConfiguration &\n  XOR3<AutoMatomoConfiguration, ManualMatomoConfiguration, DeferredMatomoConfiguration>;\n\nexport function isAutoConfigurationMode(\n  config: MatomoConfiguration\n): config is AutoMatomoConfiguration {\n  return config.mode == null || config.mode === MatomoInitializationMode.AUTO;\n}\n\nfunction hasMainTrackerConfiguration<\n  M extends MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n>(config: AutoMatomoConfiguration<M>): config is ExplicitAutoConfiguration<M> {\n  // If one is undefined, both should be\n  return config.siteId != null && config.trackerUrl != null;\n}\n\nexport function isEmbeddedTrackerConfiguration<\n  M extends MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n>(config: AutoMatomoConfiguration<M>): config is EmbeddedAutoConfiguration<M> {\n  return config.scriptUrl != null && !hasMainTrackerConfiguration(config);\n}\n\nexport function isExplicitTrackerConfiguration<\n  M extends MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n>(config: AutoMatomoConfiguration<M>): config is ExplicitAutoConfiguration<M> {\n  return hasMainTrackerConfiguration(config) || isMultiTrackerConfiguration(config);\n}\n\nexport function isMultiTrackerConfiguration(\n  config: AutoMatomoConfiguration<\n    MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n  >\n): config is MultiTrackersConfiguration {\n  return Array.isArray(config.trackers);\n}\n\nexport function getTrackersConfiguration(\n  config: ExplicitAutoConfiguration<\n    MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n  >\n): MatomoTrackerConfiguration[] {\n  return isMultiTrackerConfiguration(config)\n    ? config.trackers\n    : [\n        {\n          trackerUrl: config.trackerUrl,\n          siteId: config.siteId,\n          trackerUrlSuffix: config.trackerUrlSuffix,\n        },\n      ];\n}\n","declare var window: MatomoHolder;\n\nexport interface MatomoHolder extends Window {\n  _paq: { push: Array<unknown>['push'] };\n}\n\nexport function initializeMatomoHolder() {\n  window._paq = window._paq || [];\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Injectable, NgZone, PLATFORM_ID } from '@angular/core';\nimport { INTERNAL_MATOMO_CONFIGURATION, InternalMatomoConfiguration } from './configuration';\nimport { initializeMatomoHolder, MatomoHolder } from './holder';\nimport { Getters, RequireAtLeastOne } from './types';\n\ndeclare var window: MatomoHolder;\n\nfunction trimTrailingUndefinedElements<T>(array: T[]): T[] {\n  const trimmed = [...array];\n\n  while (trimmed.length > 0 && trimmed[trimmed.length - 1] === undefined) {\n    trimmed.pop();\n  }\n\n  return trimmed;\n}\n\nexport interface MatomoECommerceItem {\n  productSKU: string;\n  productName?: string;\n  productCategory?: string;\n  price?: number;\n  quantity?: number;\n}\n\nexport type MatomoECommerceItemView = Omit<MatomoECommerceItem, 'quantity'>;\nexport type MatomoECommerceCategoryView = Required<Pick<MatomoECommerceItem, 'productCategory'>>;\nexport type MatomoECommerceView = MatomoECommerceItemView | MatomoECommerceCategoryView;\n\nexport type PagePerformanceTimings = RequireAtLeastOne<{\n  networkTimeInMs?: number;\n  serverTimeInMs?: number;\n  transferTimeInMs?: number;\n  domProcessingTimeInMs?: number;\n  domCompletionTimeInMs?: number;\n  onloadTimeInMs?: number;\n}>;\n\nfunction isECommerceCategoryView(\n  param: string | MatomoECommerceView\n): param is MatomoECommerceCategoryView {\n  return (\n    typeof param === 'object' && Object.keys(param).length === 1 && param.productCategory != null\n  );\n}\n\nfunction isECommerceItemView(\n  param: string | MatomoECommerceView\n): param is MatomoECommerceItemView {\n  return typeof param === 'object' && 'productSKU' in param;\n}\n\n/** Matomo's internal tracker instance */\nexport interface MatomoInstance {\n  getMatomoUrl(): string;\n\n  getCurrentUrl(): string;\n\n  getLinkTrackingTimer(): number;\n\n  getVisitorId(): string;\n\n  // see https://github.com/matomo-org/matomo/blob/3cee577117ad92db739dd3f22571520207eca02e/js/piwik.js#L3306\n  getVisitorInfo(): unknown[];\n\n  /**\n   *\n   * @return array of getAttributionCampaignName, getAttributionCampaignKeyword, getAttributionReferrerTimestamp, getAttributionReferrerUrl\n   */\n  getAttributionInfo(): string[];\n\n  getAttributionCampaignName(): string;\n\n  getAttributionCampaignKeyword(): string;\n\n  getAttributionReferrerTimestamp(): string;\n\n  getAttributionReferrerUrl(): string;\n\n  getUserId(): string;\n\n  getCustomVariable(index: number, scope: string): string;\n\n  getCustomDimension(customDimensionId: number): string;\n\n  getEcommerceItems(): MatomoECommerceItem[];\n\n  hasCookies(): boolean;\n\n  getCrossDomainLinkingUrlParameter(): string;\n\n  hasRememberedConsent(): boolean;\n\n  getRememberedConsent(): number | string;\n\n  isConsentRequired(): boolean;\n\n  areCookiesEnabled(): boolean;\n\n  isUserOptedOut(): boolean;\n\n  getCustomPagePerformanceTiming(): string;\n}\n\nexport function createMatomoTracker(\n  config: InternalMatomoConfiguration,\n  platformId: Object,\n  ngZone: NgZone\n): MatomoTracker {\n  return config.disabled || !isPlatformBrowser(platformId)\n    ? new NoopMatomoTracker()\n    : new StandardMatomoTracker(ngZone, config);\n}\n\n@Injectable({\n  providedIn: 'root',\n  useFactory: createMatomoTracker,\n  deps: [INTERNAL_MATOMO_CONFIGURATION, PLATFORM_ID, NgZone],\n})\nexport abstract class MatomoTracker {\n  /**\n   * Logs a visit to this page.\n   *\n   * @param [customTitle] Optional title of the visited page.\n   */\n  trackPageView(customTitle?: string): void {\n    this.push(['trackPageView', customTitle]);\n  }\n\n  /**\n   * Logs an event with an event category (Videos, Music, Games…), an event action (Play, Pause, Duration,\n   * Add Playlist, Downloaded, Clicked…), and an optional event name and optional numeric value.\n   *\n   * @param category Category of the event.\n   * @param action Action of the event.\n   * @param [name] Optional name of the event.\n   * @param [value] Optional value for the event.\n   */\n  trackEvent(category: string, action: string, name?: string, value?: number): void {\n    this.push(['trackEvent', category, action, name, value]);\n  }\n\n  /**\n   * Logs an internal site search for a specific keyword, in an optional category,\n   * specifying the optional count of search results in the page.\n   *\n   * @param keyword Keywords of the search query.\n   * @param [category] Optional category of the search query.\n   * @param [resultsCount] Optional number of results returned by the search query.\n   */\n  trackSiteSearch(keyword: string, category?: string, resultsCount?: number): void {\n    this.push(['trackSiteSearch', keyword, category, resultsCount]);\n  }\n\n  /**\n   * Manually logs a conversion for the numeric goal ID, with an optional numeric custom revenue customRevenue.\n   *\n   * @param idGoal numeric ID of the goal to log a conversion for.\n   * @param [customRevenue] Optional custom revenue to log for the goal.\n   */\n  trackGoal(idGoal: number, customRevenue?: number): void {\n    this.push(['trackGoal', idGoal, customRevenue]);\n  }\n\n  /**\n   * Manually logs a click from your own code.\n   *\n   * @param url Full URL which is to be tracked as a click.\n   * @param linkType Either 'link' for an outlink or 'download' for a download.\n   */\n  trackLink(url: string, linkType: 'link' | 'download'): void {\n    this.push(['trackLink', url, linkType]);\n  }\n\n  /**\n   * Scans the entire DOM for all content blocks and tracks all impressions once the DOM ready event has been triggered.\n   *\n   */\n  trackAllContentImpressions(): void {\n    this.push(['trackAllContentImpressions']);\n  }\n\n  /**\n   * Scans the entire DOM for all content blocks as soon as the page is loaded.<br />\n   * It tracks an impression only if a content block is actually visible.\n   *\n   * @param checkOnScroll If true, checks for new content blocks while scrolling the page.\n   * @param timeInterval Duration, in milliseconds, between two checks upon scroll.\n   */\n  trackVisibleContentImpressions(checkOnScroll: boolean, timeInterval: number): void {\n    this.push(['trackVisibleContentImpressions', checkOnScroll, timeInterval]);\n  }\n\n  /**\n   * Scans the given DOM node and its children for content blocks and tracks an impression for them\n   * if no impression was already tracked for it.\n   *\n   * @param node DOM node in which to look for content blocks which have not been previously tracked.\n   */\n  trackContentImpressionsWithinNode(node: Node): void {\n    this.push(['trackContentImpressionsWithinNode', node]);\n  }\n\n  /**\n   * Tracks an interaction with the given DOM node/content block.\n   *\n   * @param node DOM node for which to track a content interaction.\n   * @param contentInteraction Name of the content interaction.\n   */\n  trackContentInteractionNode(node: Node, contentInteraction: string): void {\n    this.push(['trackContentInteractionNode', node, contentInteraction]);\n  }\n\n  /**\n   * Tracks a content impression using the specified values.\n   *\n   * @param contentName Content name.\n   * @param contentPiece Content piece.\n   * @param contentTarget Content target.\n   */\n  trackContentImpression(contentName: string, contentPiece: string, contentTarget: string): void {\n    this.push(['trackContentImpression', contentName, contentPiece, contentTarget]);\n  }\n\n  /**\n   * Tracks a content interaction using the specified values.\n   *\n   * @param contentInteraction Content interaction.\n   * @param contentName Content name.\n   * @param contentPiece Content piece.\n   * @param contentTarget Content target.\n   */\n  trackContentInteraction(\n    contentInteraction: string,\n    contentName: string,\n    contentPiece: string,\n    contentTarget: string\n  ): void {\n    this.push([\n      'trackContentInteraction',\n      contentInteraction,\n      contentName,\n      contentPiece,\n      contentTarget,\n    ]);\n  }\n\n  /**\n   * Logs all found content blocks within a page to the console. This is useful to debug / test content tracking.\n   */\n  logAllContentBlocksOnPage(): void {\n    this.push(['logAllContentBlocksOnPage']);\n  }\n\n  /**\n   * Send a ping request\n   * <p>\n   * Ping requests do not track new actions.\n   * If they are sent within the standard visit length, they will update the existing visit time.\n   * If sent after the standard visit length, ping requests will be ignored.\n   * See also {@link #enableHeartBeatTimer enableHeartBeatTimer()}.\n   *\n   * @see enableHeartBeatTimer\n   */\n  ping(): void {\n    this.push(['ping']);\n  }\n\n  /**\n   * Install a Heart beat timer that will regularly send requests to Matomo in order to better measure the time spent on the page.<br />\n   * These requests will be sent only when the user is actively viewing the page (when the tab is active and in focus).<br />\n   * These requests will not track additional actions or page views.<br />\n   * By default, the delay is set to 15 seconds.\n   *\n   * @param delay Delay, in seconds, between two heart beats to the server.\n   */\n  enableHeartBeatTimer(delay: number): void {\n    this.push(['enableHeartBeatTimer', delay]);\n  }\n\n  /**\n   * Installs link tracking on all applicable link elements.\n   *\n   * @param usePseudoClickHandler Set to `true` to use pseudo click-handler (treat middle click and open contextmenu as\n   * left click).<br />\n   * A right click (or any click that opens the context menu) on a link will be tracked as clicked even if \"Open in new tab\"\n   * is not selected.<br />\n   * If \"false\" (default), nothing will be tracked on open context menu or middle click.\n   */\n  enableLinkTracking(usePseudoClickHandler = false): void {\n    this.push(['enableLinkTracking', usePseudoClickHandler]);\n  }\n\n  /** Disables page performance tracking */\n  disablePerformanceTracking(): void {\n    this.push(['disablePerformanceTracking']);\n  }\n\n  /**\n   * Enables cross domain linking. By default, the visitor ID that identifies a unique visitor is stored in the browser's\n   * first party cookies.<br />\n   * This means the cookie can only be accessed by pages on the same domain.<br />\n   * If you own multiple domains and would like to track all the actions and pageviews of a specific visitor into the same visit,\n   * you may enable cross domain linking.<br />\n   * Whenever a user clicks on a link it will append a URL parameter pk_vid to the clicked URL which forwards the current\n   * visitor ID value to the page of the different domain.\n   *\n   */\n  enableCrossDomainLinking(): void {\n    this.push(['enableCrossDomainLinking']);\n  }\n\n  /**\n   * By default, the two visits across domains will be linked together when the link is clicked and the page is loaded within\n   * a 180 seconds timeout window.\n   *\n   * @param timeout Timeout, in seconds, between two actions across two domains before creating a new visit.\n   */\n  setCrossDomainLinkingTimeout(timeout: number): void {\n    this.push(['setCrossDomainLinkingTimeout', timeout]);\n  }\n\n  /**\n   * Get the query parameter to append to links to handle cross domain linking.\n   *\n   * Use this to add cross domain support for links that are added to the DOM dynamically\n   */\n  getCrossDomainLinkingUrlParameter(): Promise<string> {\n    return this.get('getCrossDomainLinkingUrlParameter');\n  }\n\n  /**\n   * Overrides document.title\n   *\n   * @param title Title of the document.\n   */\n  setDocumentTitle(title: string): void {\n    this.push(['setDocumentTitle', title]);\n  }\n\n  /**\n   * Set array of hostnames or domains to be treated as local.<br />\n   * For wildcard subdomains, you can use: `setDomains('.example.com')`; or `setDomains('*.example.com');`.<br />\n   * You can also specify a path along a domain: `setDomains('*.example.com/subsite1');`.\n   *\n   * @param domains List of hostnames or domains, with or without path, to be treated as local.\n   */\n  setDomains(domains: string[]): void {\n    this.push(['setDomains', domains]);\n  }\n\n  /**\n   * Override the page's reported URL.\n   *\n   * @param url URL to be reported for the page.\n   */\n  setCustomUrl(url: string): void {\n    this.push(['setCustomUrl', url]);\n  }\n\n  /**\n   * Overrides the detected Http-Referer.\n   *\n   * @param url URL to be reported for the referer.\n   */\n  setReferrerUrl(url: string): void {\n    this.push(['setReferrerUrl', url]);\n  }\n\n  /**\n   * Specifies the website ID.<br />\n   * Redundant: can be specified in getTracker() constructor.\n   *\n   * @param siteId Site ID for the tracker.\n   */\n  setSiteId(siteId: number | string): void {\n    this.push(['setSiteId', siteId]);\n  }\n\n  /**\n   * Specify the Matomo HTTP API URL endpoint. Points to the root directory of matomo,\n   * e.g. http://matomo.example.org/ or https://example.org/matomo/.<br />\n   * This function is only useful when the 'Overlay' report is not working.<br />\n   * By default, you do not need to use this function.\n   *\n   * @param url URL for Matomo HTTP API endpoint.\n   */\n  setApiUrl(url: string): void {\n    this.push(['setApiUrl', url]);\n  }\n\n  /**\n   * Specifies the Matomo server URL.<br />\n   * Redundant: can be specified in getTracker() constructor.\n   *\n   * @param url URL for the Matomo server.\n   */\n  setTrackerUrl(url: string): void {\n    this.push(['setTrackerUrl', url]);\n  }\n\n  /**\n   * Register an additional Matomo server<br />\n   * Redundant: can be specified in getTracker() constructor.\n   *\n   * @param url URL for the Matomo server.\n   * @param siteId Site ID for the tracker\n   */\n  addTracker(url: string, siteId: number | string): void {\n    this.push(['addTracker', url, siteId]);\n  }\n\n  /**\n   * Returns the Matomo server URL.\n   *\n   * @returns Promise for the Matomo server URL.\n   */\n  getMatomoUrl(): Promise<string> {\n    return this.get('getMatomoUrl');\n  }\n\n  /**\n   * Returns the current url of the page that is currently being visited.<br />\n   * If a custom URL was set before calling this method, the custom URL will be returned.\n   *\n   * @returns Promise for the URL of the current page.\n   */\n  getCurrentUrl(): Promise<string> {\n    return this.get('getCurrentUrl');\n  }\n\n  /**\n   * Set classes to be treated as downloads (in addition to piwik_download).\n   *\n   * @param classes Class, or list of classes to be treated as downloads.\n   */\n  setDownloadClasses(classes: string | string[]): void {\n    this.push(['setDownloadClasses', classes]);\n  }\n\n  /**\n   * Set list of file extensions to be recognized as downloads.<br />\n   * Example: `'docx'` or `['docx', 'xlsx']`.\n   *\n   * @param extensions Extension, or list of extensions to be recognized as downloads.\n   */\n  setDownloadExtensions(extensions: string | string[]): void {\n    this.push(['setDownloadExtensions', extensions]);\n  }\n\n  /**\n   * Set additional file extensions to be recognized as downloads.<br />\n   * Example: `'docx'` or `['docx', 'xlsx']`.\n   *\n   * @param extensions Extension, or list of extensions to be recognized as downloads.\n   */\n  addDownloadExtensions(extensions: string | string[]): void {\n    this.push(['addDownloadExtensions', extensions]);\n  }\n\n  /**\n   * Set file extensions to be removed from the list of download file extensions.<br />\n   * Example: `'docx'` or `['docx', 'xlsx']`.\n   *\n   * @param extensions Extension, or list of extensions not to be recognized as downloads.\n   */\n  removeDownloadExtensions(extensions: string | string[]): void {\n    this.push(['removeDownloadExtensions', extensions]);\n  }\n\n  /**\n   * Set classes to be ignored if present in link (in addition to piwik_ignore).\n   *\n   * @param classes Class, or list of classes to be ignored if present in link.\n   */\n  setIgnoreClasses(classes: string | string[]): void {\n    this.push(['setIgnoreClasses', classes]);\n  }\n\n  /**\n   * Set classes to be treated as outlinks (in addition to piwik_link).\n   *\n   * @param classes Class, or list of classes to be treated as outlinks.\n   */\n  setLinkClasses(classes: string | string[]): void {\n    this.push(['setLinkClasses', classes]);\n  }\n\n  /**\n   * Set delay for link tracking (in milliseconds).\n   *\n   * @param delay Delay, in milliseconds, for link tracking.\n   */\n  setLinkTrackingTimer(delay: number): void {\n    this.push(['setLinkTrackingTimer', delay]);\n  }\n\n  /**\n   * Returns delay for link tracking.\n   *\n   * @returns Promise for the delay in milliseconds.\n   */\n  getLinkTrackingTimer(): Promise<number> {\n    return this.get('getLinkTrackingTimer');\n  }\n\n  /**\n   * Set to true to not record the hash tag (anchor) portion of URLs.\n   *\n   * @param value If true, the hash tag portion of the URLs won't be recorded.\n   */\n  discardHashTag(value: boolean): void {\n    this.push(['discardHashTag', value]);\n  }\n\n  /**\n   * By default, Matomo uses the browser DOM Timing API to accurately determine the time it takes to generate and download\n   * the page. You may overwrite this value with this function.\n   *\n   * <b>This feature has been deprecated since Matomo 4. Any call will be ignored with Matomo 4. Use {@link setPagePerformanceTiming setPagePerformanceTiming()} instead.</b>\n   *\n   * @param generationTime Time, in milliseconds, of the page generation.\n   */\n  setGenerationTimeMs(generationTime: number): void {\n    this.push(['setGenerationTimeMs', generationTime]);\n  }\n\n  /**\n   * Manually set performance metrics in milliseconds in a Single Page App or when Matomo cannot detect some metrics.\n   *\n   * You can set parameters to undefined if you do not want to track this metric. At least one parameter needs to be set.\n   * The set performance timings will be tracked only on the next page view. If you track another page view then you will need to set the performance timings again.\n   *\n   * <b>Requires Matomo 4.5 or newer.</b>\n   *\n   */\n  setPagePerformanceTiming(timings: PagePerformanceTimings): void;\n  /**\n   * Manually set performance metrics in milliseconds in a Single Page App or when Matomo cannot detect some metrics.\n   *\n   * You can set parameters to undefined if you do not want to track this metric. At least one parameter needs to be set.\n   * The set performance timings will be tracked only on the next page view. If you track another page view then you will need to set the performance timings again.\n   *\n   * <b>Requires Matomo 4.5 or newer.</b>\n   *\n   */\n  setPagePerformanceTiming(\n    networkTimeInMs: number | undefined,\n    serverTimeInMs?: number,\n    transferTimeInMs?: number,\n    domProcessingTimeInMs?: number,\n    domCompletionTimeInMs?: number,\n    onloadTimeInMs?: number\n  ): void;\n  setPagePerformanceTiming(\n    networkTimeInMsOrTimings: PagePerformanceTimings | number | undefined,\n    serverTimeInMs?: number,\n    transferTimeInMs?: number,\n    domProcessingTimeInMs?: number,\n    domCompletionTimeInMs?: number,\n    onloadTimeInMs?: number\n  ): void {\n    let networkTimeInMs: number | undefined;\n\n    if (typeof networkTimeInMsOrTimings === 'object' && !!networkTimeInMsOrTimings) {\n      networkTimeInMs = networkTimeInMsOrTimings.networkTimeInMs;\n      serverTimeInMs = networkTimeInMsOrTimings.serverTimeInMs;\n      transferTimeInMs = networkTimeInMsOrTimings.transferTimeInMs;\n      domProcessingTimeInMs = networkTimeInMsOrTimings.domProcessingTimeInMs;\n      domCompletionTimeInMs = networkTimeInMsOrTimings.domCompletionTimeInMs;\n      onloadTimeInMs = networkTimeInMsOrTimings.onloadTimeInMs;\n    } else {\n      networkTimeInMs = networkTimeInMsOrTimings;\n    }\n\n    this.push([\n      'setPagePerformanceTiming',\n      networkTimeInMs,\n      serverTimeInMs,\n      transferTimeInMs,\n      domProcessingTimeInMs,\n      domCompletionTimeInMs,\n      onloadTimeInMs,\n    ]);\n  }\n\n  getCustomPagePerformanceTiming(): Promise<string> {\n    return this.get('getCustomPagePerformanceTiming');\n  }\n\n  /**\n   * Appends a custom string to the end of the HTTP request to matomo.php.\n   *\n   * @param appendToUrl String to append to the end of the HTTP request to matomo.php.\n   */\n  appendToTrackingUrl(appendToUrl: string): void {\n    this.push(['appendToTrackingUrl', appendToUrl]);\n  }\n\n  /** Set to `true` to not track users who opt out of tracking using <i>Do Not Track</i> setting */\n  setDoNotTrack(doNotTrack: boolean): void {\n    this.push(['setDoNotTrack', doNotTrack]);\n  }\n\n  /**\n   * Enables a frame-buster to prevent the tracked web page from being framed/iframed.\n   */\n  killFrame(): void {\n    this.push(['killFrame']);\n  }\n\n  /**\n   * Forces the browser to load the live URL if the tracked web page is loaded from a local file\n   * (e.g., saved to someone's desktop).\n   *\n   * @param url URL to track instead of file:// URLs.\n   */\n  redirectFile(url: string): void {\n    this.push(['redirectFile', url]);\n  }\n\n  /**\n   * Records how long the page has been viewed if the minimumVisitLength is attained;\n   * the heartBeatDelay determines how frequently to update the server.\n   *\n   * @param minimumVisitLength Duration before notifying the server for the duration of the visit to a page.\n   * @param heartBeatDelay Delay, in seconds, between two updates to the server.\n   */\n  setHeartBeatTimer(minimumVisitLength: number, heartBeatDelay: number): void {\n    this.push(['setHeartBeatTimer', minimumVisitLength, heartBeatDelay]);\n  }\n\n  /**\n   * Returns the 16 characters ID for the visitor.\n   *\n   * @returns Promise for the the 16 characters ID for the visitor.\n   */\n  getVisitorId(): Promise<string> {\n    return this.get('getVisitorId');\n  }\n\n  /**\n   * Set the 16 characters ID for the visitor\n   * <p/>\n   * The visitorId needs to be a 16 digit hex string.\n   * It won't be persisted in a cookie and needs to be set on every new page load.\n   *\n   * @param visitorId a 16 digit hex string\n   */\n  setVisitorId(visitorId: string): void {\n    this.push(['setVisitorId', visitorId]);\n  }\n\n  /**\n   * Returns the visitor cookie contents in an array.\n   *\n   * @returns Promise for the cookie contents in an array.\n   *\n   * TODO better return type\n   */\n  getVisitorInfo(): Promise<unknown[]> {\n    return this.get('getVisitorInfo');\n  }\n\n  /**\n   * Returns the visitor attribution array (Referer information and/or Campaign name & keyword).<br />\n   * Attribution information is used by Matomo to credit the correct referrer (first or last referrer)\n   * used when a user triggers a goal conversion.\n   *\n   * @returns Promise for the visitor attribution array (Referer information and/or Campaign name & keyword).\n   */\n  getAttributionInfo(): Promise<string[]> {\n    return this.get('getAttributionInfo');\n  }\n\n  /**\n   * Returns the attribution campaign name.\n   *\n   * @returns Promise for the the attribution campaign name.\n   */\n  getAttributionCampaignName(): Promise<string> {\n    return this.get('getAttributionCampaignName');\n  }\n\n  /**\n   * Returns the attribution campaign keyword.\n   *\n   * @returns Promise for the attribution campaign keyword.\n   */\n  getAttributionCampaignKeyword(): Promise<string> {\n    return this.get('getAttributionCampaignKeyword');\n  }\n\n  /**\n   * Returns the attribution referrer timestamp.\n   *\n   * @returns Promise for the attribution referrer timestamp (as string).\n   */\n  getAttributionReferrerTimestamp(): Promise<string> {\n    return this.get('getAttributionReferrerTimestamp');\n  }\n\n  /**\n   * Returns the attribution referrer URL.\n   *\n   * @returns Promise for the attribution referrer URL\n   */\n  getAttributionReferrerUrl(): Promise<string> {\n    return this.get('getAttributionReferrerUrl');\n  }\n\n  /**\n   * Returns the User ID string if it was set.\n   *\n   * @returns Promise for the User ID for the visitor.\n   */\n  getUserId(): Promise<string> {\n    return this.get('getUserId');\n  }\n\n  /**\n   * Set a User ID to this user (such as an email address or a username).\n   *\n   * @param userId User ID to set for the current visitor.\n   */\n  setUserId(userId: string): void {\n    this.push(['setUserId', userId]);\n  }\n\n  /**\n   * Reset the User ID which also generates a new Visitor ID.\n   *\n   */\n  resetUserId(): void {\n    this.push(['resetUserId']);\n  }\n\n  /**\n   * Set a custom variable.\n   *\n   * @param index Index, the number from 1 to 5 where this custom variable name is stored for the current page view.\n   * @param name Name, the name of the variable, for example: Category, Sub-category, UserType.\n   * @param value Value, for example: \"Sports\", \"News\", \"World\", \"Business\"…\n   * @param scope Scope of the custom variable:<br />\n   * - \"page\" means the custom variable applies to the current page view.\n   * - \"visit\" means the custom variable applies to the current visitor.\n   */\n  setCustomVariable(\n    index: number,\n    name: string,\n    value: string,\n    scope: 'page' | 'visit' | 'event'\n  ): void {\n    this.push(['setCustomVariable', index, name, value, scope]);\n  }\n\n  /**\n   * Deletes a custom variable.\n   *\n   * @param index Index of the custom variable to delete.\n   * @param scope Scope of the custom variable to delete.\n   */\n  deleteCustomVariable(index: number, scope: 'page' | 'visit' | 'event'): void {\n    this.push(['deleteCustomVariable', index, scope]);\n  }\n\n  /**\n   * Deletes all custom variables.\n   *\n   * @param scope Scope of the custom variables to delete.\n   */\n  deleteCustomVariables(scope: 'page' | 'visit' | 'event'): void {\n    this.push(['deleteCustomVariables', scope]);\n  }\n\n  /**\n   * Retrieves a custom variable.\n   *\n   * @param index Index of the custom variable to retrieve.\n   * @param scope Scope of the custom variable to retrieve.\n   * @returns Promise for the value of custom variable.\n   */\n  getCustomVariable(index: number, scope: 'page' | 'visit' | 'event'): Promise<string> {\n    return this.pushFn(matomo => matomo.getCustomVariable(index, scope));\n  }\n\n  /**\n   * When called then the Custom Variables of scope \"visit\" will be stored (persisted) in a first party cookie\n   * for the duration of the visit.<br />\n   * This is useful if you want to call getCustomVariable later in the visit.<br />\n   * (by default custom variables are not stored on the visitor's computer.)\n   *\n   */\n  storeCustomVariablesInCookie(): void {\n    this.push(['storeCustomVariablesInCookie']);\n  }\n\n  /**\n   * Set a custom dimension.<br />\n   * (requires Matomo 2.15.1 + Custom Dimensions plugin)\n   *\n   * @param customDimensionId ID of the custom dimension to set.\n   * @param customDimensionValue Value to be set.\n   */\n  setCustomDimension(customDimensionId: number, customDimensionValue: string): void {\n    this.push(['setCustomDimension', customDimensionId, customDimensionValue]);\n  }\n\n  /**\n   * Deletes a custom dimension.<br />\n   * (requires Matomo 2.15.1 + Custom Dimensions plugin)\n   *\n   * @param customDimensionId ID of the custom dimension to delete.\n   */\n  deleteCustomDimension(customDimensionId: number): void {\n    this.push(['deleteCustomDimension', customDimensionId]);\n  }\n\n  /**\n   * Retrieve a custom dimension.<br />\n   * (requires Matomo 2.15.1 + Custom Dimensions plugin)\n   *\n   * @param customDimensionId ID of the custom dimension to retrieve.\n   * @return Promise for the value for the requested custom dimension.\n   */\n  getCustomDimension(customDimensionId: number): Promise<string> {\n    return this.pushFn(matomo => matomo.getCustomDimension(customDimensionId));\n  }\n\n  /**\n   * Set campaign name parameter(s).\n   *\n   * @param name Name of the campaign\n   */\n  setCampaignNameKey(name: string): void {\n    this.push(['setCampaignNameKey', name]);\n  }\n\n  /**\n   * Set campaign keyword parameter(s).\n   *\n   * @param keyword Keyword parameter(s) of the campaign.\n   */\n  setCampaignKeywordKey(keyword: string): void {\n    this.push(['setCampaignKeywordKey', keyword]);\n  }\n\n  /**\n   * Set to true to attribute a conversion to the first referrer.<br />\n   * By default, conversion is attributed to the most recent referrer.\n   *\n   * @param conversionToFirstReferrer If true, Matomo will attribute the Goal conversion to the first referrer used\n   * instead of the last one.\n   */\n  setConversionAttributionFirstReferrer(conversionToFirstReferrer: boolean): void {\n    this.push(['setConversionAttributionFirstReferrer', conversionToFirstReferrer]);\n  }\n\n  /**\n   * Set the current page view as a product page view.<br />\n   * When you call setEcommerceView, it must be followed by a call to trackPageView to record the product or category page view.\n   *\n   * @param productSKU SKU of the viewed product.\n   * @param productName Name of the viewed product.\n   * @param productCategory Category of the viewed product.\n   * @param price Price of the viewed product.\n   */\n  setEcommerceView(\n    productSKU: string,\n    productName?: string,\n    productCategory?: string,\n    price?: number\n  ): void;\n\n  /**\n   * Set the current page view as a product page view.<br />\n   * When you call setEcommerceView, it must be followed by a call to trackPageView to record the product or category page view.\n   *\n   */\n  setEcommerceView(product: MatomoECommerceItemView): void;\n\n  /**\n   * Set the current page view as a category page view.<br />\n   * When you call setEcommerceView, it must be followed by a call to trackPageView to record the product or category page view.\n   *\n   */\n  setEcommerceView(product: MatomoECommerceCategoryView): void;\n\n  /**\n   * Set the current page view as a product or category page view.<br />\n   * When you call setEcommerceView, it must be followed by a call to trackPageView to record the product or category page view.\n   *\n   */\n  setEcommerceView(product: MatomoECommerceView): void;\n\n  setEcommerceView(\n    productOrSKU: string | MatomoECommerceView,\n    productName?: string,\n    productCategory?: string,\n    price?: number\n  ): void {\n    if (isECommerceCategoryView(productOrSKU)) {\n      this.push(['setEcommerceView', false, false, productOrSKU.productCategory]);\n    } else if (isECommerceItemView(productOrSKU)) {\n      this.push([\n        'setEcommerceView',\n        productOrSKU.productSKU,\n        productOrSKU.productName,\n        productOrSKU.productCategory,\n        productOrSKU.price,\n      ]);\n    } else {\n      this.push(['setEcommerceView', productOrSKU, productName, productCategory, price]);\n    }\n  }\n\n  /**\n   * Adds a product into the eCommerce order.<br />\n   * Must be called for each product in the order.\n   *\n   * @param productSKU SKU of the product to add.\n   * @param [productName] Optional name of the product to add.\n   * @param [productCategory] Optional category of the product to add.\n   * @param [price] Optional price of the product to add.\n   * @param [quantity] Optional quantity of the product to add.\n   */\n  addEcommerceItem(\n    productSKU: string,\n    productName?: string,\n    productCategory?: string,\n    price?: number,\n    quantity?: number\n  ): void;\n\n  /**\n   * Adds a product into the eCommerce order.<br />\n   * Must be called for each product in the order.\n   *\n   */\n  addEcommerceItem(product: MatomoECommerceItem): void;\n  addEcommerceItem(\n    productOrSKU: string | MatomoECommerceItem,\n    productName?: string,\n    productCategory?: string,\n    price?: number,\n    quantity?: number\n  ): void {\n    if (typeof productOrSKU === 'string') {\n      this.push(['addEcommerceItem', productOrSKU, productName, productCategory, price, quantity]);\n    } else {\n      this.push([\n        'addEcommerceItem',\n        productOrSKU.productSKU,\n        productOrSKU.productName,\n        productOrSKU.productCategory,\n        productOrSKU.price,\n        productOrSKU.quantity,\n      ]);\n    }\n  }\n\n  /**\n   * Remove the specified product from the untracked ecommerce order\n   *\n   * @param productSKU SKU of the product to remove.\n   */\n  removeEcommerceItem(productSKU: string): void {\n    this.push(['removeEcommerceItem', productSKU]);\n  }\n\n  /**\n   * Remove all products in the untracked ecommerce order\n   *\n   * Note: This is done automatically after {@link #trackEcommerceOrder trackEcommerceOrder()} is called\n   */\n  clearEcommerceCart(): void {\n    this.push(['clearEcommerceCart']);\n  }\n\n  /**\n   * Return all ecommerce items currently in the untracked ecommerce order\n   * <p/>\n   * The returned array will be a copy, so changing it won't affect the ecommerce order.\n   * To affect what gets tracked, use the {@link #addEcommerceItem addEcommerceItem()}, {@link #removeEcommerceItem removeEcommerceItem()},\n   * {@link #clearEcommerceCart clearEcommerceCart()} methods.\n   * Use this method to see what will be tracked before you track an order or cart update.\n   */\n  getEcommerceItems(): Promise<MatomoECommerceItem[]> {\n    return this.get('getEcommerceItems');\n  }\n\n  /**\n   * Tracks a shopping cart.<br />\n   * Call this function every time a user is adding, updating or deleting a product from the cart.\n   *\n   * @param grandTotal Grand total of the shopping cart.\n   */\n  trackEcommerceCartUpdate(grandTotal: number): void {\n    this.push(['trackEcommerceCartUpdate', grandTotal]);\n  }\n\n  /**\n   * Tracks an Ecommerce order, including any eCommerce item previously added to the order.<br />\n   * orderId and grandTotal (ie.revenue) are required parameters.\n   *\n   * @param orderId ID of the tracked order.\n   * @param grandTotal Grand total of the tracked order.\n   * @param [subTotal] Sub total of the tracked order.\n   * @param [tax] Taxes for the tracked order.\n   * @param [shipping] Shipping fees for the tracked order.\n   * @param [discount] Discount granted for the tracked order.\n   */\n  trackEcommerceOrder(\n    orderId: string,\n    grandTotal: number,\n    subTotal?: number,\n    tax?: number,\n    shipping?: number,\n    discount?: number\n  ): void {\n    this.push(['trackEcommerceOrder', orderId, grandTotal, subTotal, tax, shipping, discount]);\n  }\n\n  /**\n   * Require nothing is tracked until a user consents\n   *\n   * By default the Matomo tracker assumes consent to tracking.\n   *\n   * @see `requireConsent` module configuration property\n   */\n  requireConsent(): void {\n    this.push(['requireConsent']);\n  }\n\n  /**\n   * Mark that the current user has consented\n   *\n   * The consent is one-time only, so in a subsequent browser session, the user will have to consent again.\n   * To remember consent, see {@link rememberConsentGiven}.\n   */\n  setConsentGiven(): void {\n    this.push(['setConsentGiven']);\n  }\n\n  /**\n   * Mark that the current user has consented, and remembers this consent through a browser cookie.\n   *\n   * The next time the user visits the site, Matomo will remember that they consented, and track them.\n   * If you call this method, you do not need to call {@link setConsentGiven}.\n   *\n   * @param hoursToExpire After how many hours the consent should expire. By default the consent is valid\n   *                          for 30 years unless cookies are deleted by the user or the browser prior to this\n   */\n  rememberConsentGiven(hoursToExpire?: number): void {\n    this.push(['rememberConsentGiven', hoursToExpire]);\n  }\n\n  /**\n   * Remove a user's consent, both if the consent was one-time only and if the consent was remembered.\n   *\n   * After calling this method, the user will have to consent again in order to be tracked.\n   */\n  forgetConsentGiven(): void {\n    this.push(['forgetConsentGiven']);\n  }\n\n  /** Return whether the current visitor has given consent previously or not */\n  hasRememberedConsent(): Promise<boolean> {\n    return this.get('hasRememberedConsent');\n  }\n\n  /**\n   * If consent was given, returns the timestamp when the visitor gave consent\n   *\n   * Only works if {@link rememberConsentGiven} was used and not when {@link setConsentGiven} was used.\n   * The timestamp is the local timestamp which depends on the visitors time.\n   */\n  getRememberedConsent(): Promise<string | number> {\n    return this.get('getRememberedConsent');\n  }\n\n  /** Return whether {@link requireConsent} was called previously */\n  isConsentRequired(): Promise<boolean> {\n    return this.get('isConsentRequired');\n  }\n\n  /**\n   * Require no cookies are used\n   *\n   * By default the Matomo tracker assumes consent to using cookies\n   */\n  requireCookieConsent(): void {\n    this.push(['requireCookieConsent']);\n  }\n\n  /**\n   * Mark that the current user has consented to using cookies\n   *\n   * The consent is one-time only, so in a subsequent browser session, the user will have to consent again.\n   * To remember cookie consent, see {@link rememberCookieConsentGiven}.\n   */\n  setCookieConsentGiven(): void {\n    this.push(['setCookieConsentGiven']);\n  }\n\n  /**\n   * Mark that the current user has consented to using cookies, and remembers this consent through a browser cookie.\n   *\n   * The next time the user visits the site, Matomo will remember that they consented, and use cookies.\n   * If you call this method, you do not need to call {@link setCookieConsentGiven}.\n   *\n   * @param hoursToExpire After how many hours the cookie consent should expire. By default the consent is valid\n   *                          for 30 years unless cookies are deleted by the user or the browser prior to this\n   */\n  rememberCookieConsentGiven(hoursToExpire?: number): void {\n    this.push(['rememberCookieConsentGiven', hoursToExpire]);\n  }\n\n  /**\n   * Remove a user's cookie consent, both if the consent was one-time only and if the consent was remembered.\n   *\n   * After calling this method, the user will have to consent again in order for cookies to be used.\n   */\n  forgetCookieConsentGiven(): void {\n    this.push(['forgetCookieConsentGiven']);\n  }\n\n  /** Return whether cookies are currently enabled or disabled */\n  areCookiesEnabled(): Promise<boolean> {\n    return this.get('areCookiesEnabled');\n  }\n\n  /** After calling this function, the user will be opted out and no longer be tracked */\n  optUserOut(): void {\n    this.push(['optUserOut']);\n  }\n\n  /** After calling this method the user will be tracked again */\n  forgetUserOptOut(): void {\n    this.push(['forgetUserOptOut']);\n  }\n\n  /**\n   * Return whether the user is opted out or not\n   *\n   * Note: This method might not return the correct value if you are using the opt out iframe.\n   */\n  isUserOptedOut(): Promise<boolean> {\n    return this.get('isUserOptedOut');\n  }\n\n  /**\n   * Disables all first party cookies.<br />\n   * Existing Matomo cookies for this websites will be deleted on the next page view.\n   */\n  disableCookies(): void {\n    this.push(['disableCookies']);\n  }\n\n  /**\n   * Deletes the tracking cookies currently set (useful when creating new visits).\n   */\n  deleteCookies(): void {\n    this.push(['deleteCookies']);\n  }\n\n  /**\n   * Returns whether cookies are enabled and supported by this browser.\n   *\n   * @returns Promise for the support and activation of cookies.\n   */\n  hasCookies(): Promise<boolean> {\n    return this.get('hasCookies');\n  }\n\n  /**\n   * Set the tracking cookie name prefix.<br />\n   * Default prefix is 'pk'.\n   *\n   * @param prefix Prefix for the tracking cookie names.\n   */\n  setCookieNamePrefix(prefix: string): void {\n    this.push(['setCookieNamePrefix', prefix]);\n  }\n\n  /**\n   * Set the domain of the tracking cookies.<br />\n   * Default is the document domain.<br />\n   * If your website can be visited at both www.example.com and example.com, you would use: `'.example.com'` or `'*.example.com'`.\n   *\n   * @param domain Domain of the tracking cookies.\n   */\n  setCookieDomain(domain: string): void {\n    this.push(['setCookieDomain', domain]);\n  }\n\n  /**\n   * Set the path of the tracking cookies.<br />\n   * Default is '/'.\n   *\n   * @param path Path of the tracking cookies.\n   */\n  setCookiePath(path: string): void {\n    this.push(['setCookiePath', path]);\n  }\n\n  /**\n   * Set to true to enable the Secure cookie flag on all first party cookies.<br />\n   * This should be used when your website is only available under HTTPS so that all tracking cookies are always sent\n   * over secure connection.\n   *\n   * @param secure If true, the secure cookie flag will be set on all first party cookies.\n   */\n  setSecureCookie(secure: boolean): void {\n    this.push(['setSecureCookie', secure]);\n  }\n\n  /**\n   * Set cookie <i>same site</i>\n   * <p/>\n   * Defaults to Lax.\n   * Can be set to None or Strict.\n   * None requires all traffic to be on HTTPS and will also automatically set the secure cookie.\n   * It can be useful for example if the tracked website is an iframe.\n   * Strict only works if your Matomo and the website runs on the very same domain.\n   */\n  setCookieSameSite(sameSite: 'Strict' | 'Lax' | 'None'): void {\n    this.push(['setCookieSameSite', sameSite]);\n  }\n\n  /**\n   * Set the visitor cookie timeout.<br />\n   * Default is 13 months.\n   *\n   * @param timeout Timeout, in seconds, for the visitor cookie timeout.\n   */\n  setVisitorCookieTimeout(timeout: number): void {\n    this.push(['setVisitorCookieTimeout', timeout]);\n  }\n\n  /**\n   * Set the referral cookie timeout.<br />\n   * Default is 6 months.\n   *\n   * @param timeout Timeout, in seconds, for the referral cookie timeout.\n   */\n  setReferralCookieTimeout(timeout: number): void {\n    this.push(['setReferralCookieTimeout', timeout]);\n  }\n\n  /**\n   * Set the session cookie timeout.<br />\n   * Default is 30 minutes.\n   *\n   * @param timeout Timeout, in seconds, for the session cookie timeout.\n   */\n  setSessionCookieTimeout(timeout: number): void {\n    this.push(['setSessionCookieTimeout', timeout]);\n  }\n\n  /**\n   * Adds a click listener to a specific link element.<br />\n   * When clicked, Matomo will log the click automatically.\n   *\n   * @param element Element on which to add a click listener.\n   */\n  addListener(element: Element): void {\n    this.push(['addListener', element]);\n  }\n\n  /**\n   * Set the request method to either \"GET\" or \"POST\". (The default is \"GET\".)<br />\n   * To use the POST request method, either:<br />\n   * 1) the Matomo host is the same as the tracked website host (Matomo installed in the same domain as your tracked website), or<br />\n   * 2) if Matomo is not installed on the same host as your website, you need to enable CORS (Cross domain requests).\n   *\n   * @param method HTTP method for sending information to the Matomo server.\n   */\n  setRequestMethod(method: string): void {\n    this.push(['setRequestMethod', method]);\n  }\n\n  /**\n   * Set a function that will process the request content.<br />\n   * The function will be called once the request (query parameters string) has been prepared, and before the request content is sent.\n   *\n   * @param callback Function that will process the request content.\n   */\n  setCustomRequestProcessing(callback: (queryParameters: string) => void): void {\n    this.push(['setCustomRequestProcessing', callback]);\n  }\n\n  /**\n   * Set request Content-Type header value.<br />\n   * Applicable when \"POST\" request method is used via setRequestMethod.\n   *\n   * @param contentType Value for Content-Type HTTP header.\n   */\n  setRequestContentType(contentType: string): void {\n    this.push(['setRequestContentType', contentType]);\n  }\n\n  /**\n   * Disable the feature which groups together multiple tracking requests and send them as a bulk POST request.\n   * <p/>\n   * Disabling this feature is useful when you want to be able to replay all logs:\n   * one must use disableQueueRequest to disable this behaviour to later be able to replay logged\n   * Matomo logs (otherwise a subset of the requests wouldn't be able to be replayed).\n   */\n  disableQueueRequest(): void {\n    this.push(['disableQueueRequest']);\n  }\n\n  /**\n   * Defines after how many ms a queued requests will be executed after the request was queued initially\n   * <p/>\n   * The higher the value the more tracking requests can be sent together at once\n   *\n   * @param interval Interval in milliseconds, must be at least 1000, defaults to 2500\n   */\n  setRequestQueueInterval(interval: number): void {\n    this.push(['setRequestQueueInterval', interval]);\n  }\n\n  /** Disable sending tracking requests using `navigator.sendBeacon` which is enabled by default */\n  disableAlwaysUseSendBeacon(): void {\n    this.push(['disableAlwaysUseSendBeacon']);\n  }\n\n  /** Enable sending tracking requests using `navigator.sendBeacon` (enabled by default) */\n  alwaysUseSendBeacon(): void {\n    this.push(['alwaysUseSendBeacon']);\n  }\n\n  /**\n   * Enable Javascript errors tracking. JS errors are then tracked as events with category\n   * \"JavaScript Errors\". Refer to official doc for more details.\n   *\n   * @see https://matomo.org/faq/how-to/how-do-i-enable-basic-javascript-error-tracking-and-reporting-in-matomo-browser-console-error-messages/\n   */\n  enableJSErrorTracking(): void {\n    this.push(['enableJSErrorTracking']);\n  }\n\n  /**\n   * Enable tracking of file:// protocol actions. By default, the file:// protocol is not tracked.\n   */\n  enableFileTracking(): void {\n    this.push(['enableFileTracking']);\n  }\n\n  /** Asynchronously call provided method name on matomo tracker instance */\n  protected get<G extends Getters<MatomoInstance>>(\n    getter: G\n  ): Promise<ReturnType<MatomoInstance[G]>> {\n    return this.pushFn(matomo => matomo[getter]() as ReturnType<MatomoInstance[G]>);\n  }\n\n  /**\n   * Asynchronously call provided method with matomo tracker instance as argument\n   *\n   * @return Promise resolving to the return value of given method\n   */\n  protected abstract pushFn<T>(fn: (matomo: MatomoInstance) => T): Promise<T>;\n\n  protected abstract push(args: unknown[]): void;\n}\n\nexport class StandardMatomoTracker extends MatomoTracker {\n  constructor(\n    private readonly ngZone: NgZone,\n    private readonly config: InternalMatomoConfiguration\n  ) {\n    super();\n    initializeMatomoHolder();\n  }\n\n  protected pushFn<T>(fn: (matomo: MatomoInstance) => T): Promise<T> {\n    return new Promise(resolve => {\n      this.push([\n        function (this: MatomoInstance): void {\n          resolve(fn(this));\n        },\n      ]);\n    });\n  }\n\n  protected push(args: unknown[]): void {\n    if (this.config.runOutsideAngularZone) {\n      this.ngZone.runOutsideAngular(() => {\n        window._paq.push(trimTrailingUndefinedElements(args));\n      });\n    } else {\n      window._paq.push(trimTrailingUndefinedElements(args));\n    }\n  }\n}\n\nexport class NoopMatomoTracker extends MatomoTracker {\n  protected push(args: unknown[]): void {\n    // No-op\n  }\n\n  protected pushFn<T>(fn: (matomo: MatomoInstance) => T): Promise<T> {\n    return Promise.reject('MatomoTracker is disabled');\n  }\n}\n","import {\n  Component,\n  Inject,\n  Input,\n  LOCALE_ID,\n  OnChanges,\n  OnInit,\n  Optional,\n  SecurityContext,\n  SimpleChanges,\n} from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { coerceCssSizeBinding, CssSizeInput } from '../coercion';\nimport {\n  getTrackersConfiguration,\n  INTERNAL_MATOMO_CONFIGURATION,\n  InternalMatomoConfiguration,\n  isAutoConfigurationMode,\n  isExplicitTrackerConfiguration,\n} from '../configuration';\n\nconst DEFAULT_BORDER = '0';\nconst DEFAULT_WIDTH = '600px';\nconst DEFAULT_HEIGHT = '200px';\nconst URL_PATTERN =\n  '{SERVER}/index.php?module=CoreAdminHome&action=optOut&language={LOCALE}&backgroundColor={BG_COLOR}&fontColor={COLOR}&fontSize={FONT_SIZE}&fontFamily={FONT_FAMILY}';\n\nfunction missingServerUrlError(): Error {\n  return new Error(\n    'It is required to set [serverUrl] when Matomo configuration mode is set to MANUAL'\n  );\n}\n\n/**\n * Basic opt-out form, based on an iframe auto-generated by Matomo.\n *\n * <b>WARNING:</b> By default, this component assumes the tracker url set in MatomoConfiguration is\n * safe to be used as an iframe `src`. You have to make sure that this url is safe before using this\n * component!\n */\n@Component({\n  selector: 'matomo-opt-out-form',\n  templateUrl: './matomo-opt-out-form.component.html',\n})\nexport class MatomoOptOutFormComponent implements OnInit, OnChanges {\n  private readonly _defaultServerUrl?: string;\n\n  private _border: string = DEFAULT_BORDER;\n  private _width: string = DEFAULT_WIDTH;\n  private _height: string = DEFAULT_HEIGHT;\n  private _iframeSrc: SafeResourceUrl = this.sanitizer.bypassSecurityTrustResourceUrl('');\n  private _serverUrlOverride?: SafeResourceUrl;\n\n  /**\n   * Set a custom locale for the opt-out form\n   * <br>\n   * Default is the current app locale available in LOCALE_ID token\n   */\n  @Input() locale: string;\n  /** Font color (note that Matomo currently only supports hexadecimal without leading hash notation) */\n  @Input() color: string = '';\n  /** Background color (note that Matomo currently only supports hexadecimal without leading hash notation) */\n  @Input() backgroundColor: string = '';\n  @Input() fontSize: string = '';\n  @Input() fontFamily: string = '';\n\n  constructor(\n    private readonly sanitizer: DomSanitizer,\n    @Inject(INTERNAL_MATOMO_CONFIGURATION) private readonly config: InternalMatomoConfiguration,\n    @Optional() @Inject(LOCALE_ID) locale: string = ''\n  ) {\n    // Set default locale\n    this.locale = locale;\n\n    if (isAutoConfigurationMode(this.config) && isExplicitTrackerConfiguration(this.config)) {\n      this._defaultServerUrl = getTrackersConfiguration(this.config)[0].trackerUrl;\n    }\n  }\n\n  get serverUrl(): SafeResourceUrl | undefined {\n    return this._serverUrlOverride;\n  }\n\n  /**\n   * Set a custom Matomo server url to be used for iframe generation\n   * <br>\n   * By default, tracker url is retrieved from MatomoConfiguration.\n   * <br>\n   * <b>WARNING:</b> This component assumes the url you provide is safe to be used as an iframe\n   * `src`. You have to make sure that this url is safe before using this component!\n   */\n  @Input()\n  set serverUrl(value: SafeResourceUrl | undefined) {\n    this._serverUrlOverride = value;\n  }\n\n  get iframeSrc(): SafeResourceUrl | undefined {\n    return this._iframeSrc;\n  }\n\n  get height(): string {\n    return this._height;\n  }\n\n  @Input()\n  set height(value: string) {\n    this._height = coerceCssSizeBinding(value);\n  }\n\n  get width(): string {\n    return this._width;\n  }\n\n  @Input()\n  set width(value: string) {\n    this._width = coerceCssSizeBinding(value);\n  }\n\n  get border(): string {\n    return this._border;\n  }\n\n  @Input()\n  set border(value: string) {\n    this._border = coerceCssSizeBinding(value);\n  }\n\n  ngOnInit() {\n    this.updateUrl();\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (\n      'serverUrl' in changes ||\n      'locale' in changes ||\n      'color' in changes ||\n      'backgroundColor' in changes ||\n      'fontSize' in changes ||\n      'fontFamily' in changes\n    ) {\n      this.updateUrl();\n    }\n  }\n\n  private updateUrl(): void {\n    let serverUrl: string | null | undefined = this._defaultServerUrl;\n\n    if (this._serverUrlOverride) {\n      serverUrl = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, this._serverUrlOverride);\n    }\n\n    if (!serverUrl) {\n      throw missingServerUrlError();\n    }\n\n    const url = URL_PATTERN.replace('{SERVER}', serverUrl)\n      .replace('{LOCALE}', encodeURIComponent(this.locale))\n      .replace('{COLOR}', encodeURIComponent(this.color))\n      .replace('{BG_COLOR}', encodeURIComponent(this.backgroundColor))\n      .replace('{FONT_SIZE}', encodeURIComponent(this.fontSize))\n      .replace('{FONT_FAMILY}', encodeURIComponent(this.fontFamily));\n\n    this._iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(url);\n  }\n\n  static ngAcceptInputType_border: CssSizeInput;\n  static ngAcceptInputType_width: CssSizeInput;\n  static ngAcceptInputType_height: CssSizeInput;\n}\n","<iframe [style.border]=\"border\" [style.width]=\"width\" [style.height]=\"height\" [src]=\"iframeSrc\"></iframe>\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { MatomoTracker } from '../matomo-tracker.service';\nimport { requireNonNull } from '../coercion';\n\n@Directive({\n  selector: '[matomoClickCategory][matomoClickAction]',\n})\nexport class MatomoTrackClickDirective {\n  @Input() matomoClickCategory?: string;\n  @Input() matomoClickAction?: string;\n  @Input() matomoClickName?: string;\n  @Input() matomoClickValue?: number;\n\n  constructor(private readonly tracker: MatomoTracker) {}\n\n  @HostListener('click')\n  onClick(): void {\n    this.tracker.trackEvent(\n      requireNonNull(this.matomoClickCategory, 'matomo category is required'),\n      requireNonNull(this.matomoClickAction, 'matomo action is required'),\n      this.matomoClickName,\n      this.matomoClickValue\n    );\n  }\n}\n","import { Directive, ElementRef, Input, OnDestroy } from '@angular/core';\nimport { fromEvent, merge, Subscription } from 'rxjs';\nimport { requireNonNull } from '../coercion';\nimport { MatomoTracker } from '../matomo-tracker.service';\n\nexport interface TrackArgs {\n  category?: string;\n  action?: string;\n  name?: string;\n  value?: number;\n}\n\ntype EventName = keyof GlobalEventHandlersEventMap | string;\ntype DOMEventInput = EventName | EventName[] | null | undefined;\n\nfunction coerceEventNames(input: DOMEventInput): EventName[] | null | undefined {\n  if (input && input.length > 0) {\n    return Array.isArray(input) ? input : [input];\n  } else {\n    return undefined;\n  }\n}\n\n@Directive({\n  selector: '[matomoTracker]',\n  exportAs: 'matomo',\n})\nexport class MatomoTrackerDirective implements OnDestroy {\n  private sub?: Subscription;\n\n  /** Set the event category */\n  @Input() matomoCategory?: string;\n  /** Set the event action */\n  @Input() matomoAction?: string;\n  /** Set the event name */\n  @Input() matomoName?: string;\n  /** Set the event value */\n  @Input() matomoValue?: number;\n\n  constructor(private readonly tracker: MatomoTracker, private readonly elementRef: ElementRef) {}\n\n  /** Track a Matomo event whenever specified DOM event is triggered */\n  @Input()\n  set matomoTracker(input: DOMEventInput) {\n    const eventNames = coerceEventNames(input);\n\n    this.sub?.unsubscribe();\n\n    if (eventNames) {\n      const handlers = eventNames.map(eventName =>\n        fromEvent(this.elementRef.nativeElement, eventName)\n      );\n\n      this.sub = merge(...handlers).subscribe(() => this.trackEvent());\n    } else {\n      this.sub = undefined;\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.sub?.unsubscribe();\n  }\n\n  /** Track an event using category, action, name and value set as @Input() */\n  // eslint-disable-next-line @typescript-eslint/unified-signatures\n  trackEvent(): void;\n\n  /** Track an event using category, action and name set as @Input() and provided value */\n  // eslint-disable-next-line @typescript-eslint/unified-signatures\n  trackEvent(value: number): void;\n\n  /** Track an event using category and action set as @Input() and provided name and value */\n  // eslint-disable-next-line @typescript-eslint/unified-signatures\n  trackEvent(name: string, value?: number): void;\n\n  /** Track an event using provided category, action, name and value (any @Input() is used as a default value) */\n  // eslint-disable-next-line @typescript-eslint/unified-signatures\n  trackEvent(args: TrackArgs): void;\n\n  trackEvent(arg1?: TrackArgs | string | number, arg2?: number): void {\n    let category = this.matomoCategory;\n    let action = this.matomoAction;\n    let name = this.matomoName;\n    let value = this.matomoValue;\n\n    if (typeof arg1 === 'object') {\n      category = arg1.category ?? category;\n      action = arg1.action ?? action;\n      name = arg1.name ?? name;\n      value = arg1.value ?? value;\n    } else if (typeof arg1 === 'string') {\n      name = arg1;\n\n      if (typeof arg2 === 'number') {\n        value = arg2;\n      }\n    } else if (typeof arg1 === 'number') {\n      value = arg1;\n    }\n\n    this.tracker.trackEvent(\n      requireNonNull(category, 'matomo category is required'),\n      requireNonNull(action, 'matomo action is required'),\n      name,\n      value\n    );\n  }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport type MatomoScriptFactory = (scriptUrl: string, document: Document) => HTMLScriptElement;\n\nexport const createDefaultMatomoScriptElement: MatomoScriptFactory = (scriptUrl, document) => {\n  const g = document.createElement('script');\n\n  g.type = 'text/javascript';\n  g.defer = true;\n  g.async = true;\n  g.src = scriptUrl;\n\n  return g;\n};\n\nexport const MATOMO_SCRIPT_FACTORY = new InjectionToken<MatomoScriptFactory>(\n  'MATOMO_SCRIPT_FACTORY',\n  {\n    providedIn: 'root',\n    factory: () => createDefaultMatomoScriptElement,\n  }\n);\n","export const ALREADY_INJECTED_ERROR = 'Matomo trackers have already been initialized';\nexport const ALREADY_INITIALIZED_ERROR = 'Matomo has already been initialized';\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { requireNonNull } from './coercion';\nimport {\n  AutoMatomoConfiguration,\n  getTrackersConfiguration,\n  INTERNAL_MATOMO_CONFIGURATION,\n  InternalMatomoConfiguration,\n  isAutoConfigurationMode,\n  isEmbeddedTrackerConfiguration,\n  isExplicitTrackerConfiguration,\n  MatomoConsentMode,\n  MatomoInitializationMode,\n  MatomoTrackerConfiguration,\n} from './configuration';\nimport { ALREADY_INITIALIZED_ERROR, ALREADY_INJECTED_ERROR } from './errors';\nimport { initializeMatomoHolder } from './holder';\nimport { MatomoTracker } from './matomo-tracker.service';\nimport { MATOMO_SCRIPT_FACTORY, MatomoScriptFactory } from './script-factory';\n\nfunction coerceSiteId(siteId: number | string): string {\n  return `${siteId}`;\n}\n\nfunction appendTrailingSlash(str: string): string {\n  return str.endsWith('/') ? str : `${str}/`;\n}\n\nfunction buildTrackerUrl(url: string, suffix: string | undefined): string {\n  if (suffix == null) {\n    return appendTrailingSlash(url) + DEFAULT_TRACKER_SUFFIX;\n  }\n  return url + suffix;\n}\n\nconst DEFAULT_TRACKER_SUFFIX = 'matomo.php';\nconst DEFAULT_SCRIPT_SUFFIX = 'matomo.js';\n\nexport function createMatomoInitializer(\n  config: InternalMatomoConfiguration,\n  tracker: MatomoTracker,\n  scriptFactory: MatomoScriptFactory,\n  document: Document,\n  platformId: Object\n): MatomoInitializerService {\n  return config.disabled || !isPlatformBrowser(platformId)\n    ? (new NoopMatomoInitializer() as MatomoInitializerService)\n    : new MatomoInitializerService(config, tracker, scriptFactory, document);\n}\n\nexport class NoopMatomoInitializer\n  implements Pick<MatomoInitializerService, 'initialize' | 'initializeTracker'>\n{\n  initialize(): void {\n    // No-op\n  }\n\n  initializeTracker(\n    _: AutoMatomoConfiguration<\n      MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n    >\n  ): void {\n    // No-op\n  }\n}\n\n@Injectable({\n  providedIn: 'root',\n  useFactory: createMatomoInitializer,\n  deps: [\n    INTERNAL_MATOMO_CONFIGURATION,\n    MatomoTracker,\n    MATOMO_SCRIPT_FACTORY,\n    DOCUMENT,\n    PLATFORM_ID,\n  ],\n})\nexport class MatomoInitializerService {\n  private initialized = false;\n  private injected = false;\n\n  constructor(\n    private readonly config: InternalMatomoConfiguration,\n    private readonly tracker: MatomoTracker,\n    @Inject(MATOMO_SCRIPT_FACTORY) private readonly scriptFactory: MatomoScriptFactory,\n    @Inject(DOCUMENT) private readonly document: Document\n  ) {\n    initializeMatomoHolder();\n  }\n\n  /** @deprecated use {@link initialize initialize()} instead */\n  init(): void {\n    this.initialize();\n  }\n\n  initialize(): void {\n    if (this.initialized) {\n      throw new Error(ALREADY_INITIALIZED_ERROR);\n    }\n\n    this.runPreInitTasks();\n\n    if (isAutoConfigurationMode(this.config)) {\n      this.injectMatomoScript(this.config);\n    }\n\n    this.initialized = true;\n  }\n\n  initializeTracker(config: AutoMatomoConfiguration<MatomoInitializationMode.AUTO_DEFERRED>): void {\n    this.injectMatomoScript(config);\n  }\n\n  private injectMatomoScript(\n    config: AutoMatomoConfiguration<\n      MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED\n    >\n  ): void {\n    if (this.injected) {\n      throw new Error(ALREADY_INJECTED_ERROR);\n    }\n\n    if (isExplicitTrackerConfiguration(config)) {\n      const { scriptUrl: customScriptUrl } = config;\n      const [mainTracker, ...additionalTrackers] = getTrackersConfiguration(config);\n      const scriptUrl =\n        customScriptUrl ?? appendTrailingSlash(mainTracker.trackerUrl) + DEFAULT_SCRIPT_SUFFIX;\n\n      this.registerMainTracker(mainTracker);\n      this.registerAdditionalTrackers(additionalTrackers);\n      this.injectDOMScript(scriptUrl);\n    } else if (isEmbeddedTrackerConfiguration(config)) {\n      const { scriptUrl, trackers: additionalTrackers } = {\n        trackers: [],\n        ...config,\n      };\n\n      this.registerAdditionalTrackers(additionalTrackers);\n      this.injectDOMScript(scriptUrl);\n    }\n\n    this.injected = true;\n  }\n\n  private registerMainTracker(mainTracker: MatomoTrackerConfiguration): void {\n    const mainTrackerUrl = buildTrackerUrl(mainTracker.trackerUrl, mainTracker.trackerUrlSuffix);\n    const mainTrackerSiteId = coerceSiteId(mainTracker.siteId);\n\n    this.tracker.setTrackerUrl(mainTrackerUrl);\n    this.tracker.setSiteId(mainTrackerSiteId);\n  }\n\n  private registerAdditionalTrackers(additionalTrackers: MatomoTrackerConfiguration[]): void {\n    additionalTrackers.forEach(({ trackerUrl, siteId, trackerUrlSuffix }) => {\n      const additionalTrackerUrl = buildTrackerUrl(trackerUrl, trackerUrlSuffix);\n      const additionalTrackerSiteId = coerceSiteId(siteId);\n\n      this.tracker.addTracker(additionalTrackerUrl, additionalTrackerSiteId);\n    });\n  }\n\n  private injectDOMScript(scriptUrl: string): void {\n    const scriptElement = this.scriptFactory(scriptUrl, this.document);\n    const selfScript = requireNonNull(\n      this.document.getElementsByTagName('script')[0],\n      'no existing script found'\n    );\n    const parent = requireNonNull(selfScript.parentNode, \"no script's parent node found\");\n\n    parent.insertBefore(scriptElement, selfScript);\n  }\n\n  private runPreInitTasks(): void {\n    if (this.config.acceptDoNotTrack) {\n      this.tracker.setDoNotTrack(true);\n    }\n\n    if (this.config.requireConsent === MatomoConsentMode.COOKIE) {\n      this.tracker.requireCookieConsent();\n    } else if (this.config.requireConsent === MatomoConsentMode.TRACKING) {\n      this.tracker.requireConsent();\n    }\n\n    if (this.config.enableJSErrorTracking) {\n      this.tracker.enableJSErrorTracking();\n    }\n\n    if (this.config.trackAppInitialLoad) {\n      this.tracker.trackPageView();\n    }\n\n    if (this.config.enableLinkTracking) {\n      this.tracker.enableLinkTracking();\n    }\n  }\n}\n","import { ModuleWithProviders, NgModule, Optional, Provider, SkipSelf } from '@angular/core';\nimport { MATOMO_CONFIGURATION, MatomoConfiguration } from './configuration';\nimport { MatomoOptOutFormComponent } from './directives/matomo-opt-out-form.component';\nimport { MatomoTrackClickDirective } from './directives/matomo-track-click.directive';\nimport { MatomoTrackerDirective } from './directives/matomo-tracker.directive';\nimport { MatomoInitializerService } from './matomo-initializer.service';\nimport { MATOMO_SCRIPT_FACTORY, MatomoScriptFactory } from './script-factory';\n\n@NgModule({\n  declarations: [MatomoTrackerDirective, MatomoTrackClickDirective, MatomoOptOutFormComponent],\n  exports: [MatomoTrackerDirective, MatomoTrackClickDirective, MatomoOptOutFormComponent],\n})\nexport class NgxMatomoTrackerModule {\n  constructor(\n    private readonly initializer: MatomoInitializerService,\n    @Optional() @SkipSelf() parent?: NgxMatomoTrackerModule\n  ) {\n    if (!parent) {\n      // Do not initialize if it is already (by a parent module)\n      this.initializer.initialize();\n    }\n  }\n\n  static forRoot(\n    config: MatomoConfiguration,\n    scriptFactory?: MatomoScriptFactory\n  ): ModuleWithProviders<NgxMatomoTrackerModule> {\n    const providers: Provider[] = [{ provide: MATOMO_CONFIGURATION, useValue: config }];\n\n    if (scriptFactory) {\n      providers.push({ provide: MATOMO_SCRIPT_FACTORY, useValue: scriptFactory });\n    }\n\n    return {\n      ngModule: NgxMatomoTrackerModule,\n      providers,\n    };\n  }\n}\n","/*\n * Public API Surface of tracker\n */\n\nexport {\n  MatomoTracker,\n  MatomoECommerceItem,\n  MatomoECommerceView,\n  MatomoECommerceItemView,\n  MatomoECommerceCategoryView,\n} from './lib/matomo-tracker.service';\nexport { NgxMatomoTrackerModule } from './lib/ngx-matomo-tracker.module';\nexport { MatomoInitializerService } from './lib/matomo-initializer.service';\nexport {\n  MatomoConfiguration,\n  MATOMO_CONFIGURATION,\n  AutoMatomoConfiguration,\n  MatomoInitializationMode,\n  MatomoConsentMode,\n  InternalMatomoConfiguration,\n  INTERNAL_MATOMO_CONFIGURATION,\n} from './lib/configuration';\nexport {\n  MATOMO_SCRIPT_FACTORY,\n  MatomoScriptFactory,\n  createDefaultMatomoScriptElement,\n} from './lib/script-factory';\nexport { MatomoTrackerDirective } from './lib/directives/matomo-tracker.directive';\nexport { MatomoTrackClickDirective } from './lib/directives/matomo-track-click.directive';\nexport { MatomoOptOutFormComponent } from './lib/directives/matomo-opt-out-form.component';\n","/**\n * Generated bundle index. Do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