diff --git a/README.md b/README.md
index a67d33c..1dfd91f 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,8 @@
-**@piwikpro/ngx-piwik-pro** • [**Docs**](#modulesmd)
-***
+
# Piwik PRO Library for Angular
@@ -17,20 +16,10 @@ Dedicated Piwik PRO library that helps with implementing Piwik PRO Tag Manager a
- [Piwik PRO Services](#piwik-pro-services)
- [Custom Events](#send-custom-events)
- [Page Views](#send-page-views-and-virtual-page-views)
-- [API](#api)
- - [Page Views Service](#page-views-service)
- - [User Management](#user-management)
- - [Custom Event](#custom-event)
- - [Site search Service](#site-search-service)
- - [E-Commerce Service](#e-commerce-service)
- - [Content Tracking Service](#content-tracking-service)
- - [Download and outlink Service](#download-and-outlink-service)
- - [Goal Conversions](#goal-conversions)
- - [Custom Dimensions](#custom-dimensions)
-## Installation
+### Installation
-### NPM
+#### NPM
To use this package in your project, run the following command.
@@ -38,7 +27,7 @@ To use this package in your project, run the following command.
npm install @piwikpro/ngx-piwik-pro
```
-### Basic setup
+#### Basic setup
In your Angular Project, include the `NgxPiwikProModule` in the highest level application module. ie `AddModule`.
To set up the Piwik PRO Tag Manager container in the app, the easiest way is to call the `forRoot()` method.
@@ -60,7 +49,7 @@ import { NgxPiwikProModule } from "@piwikpro/ngx-piwik-pro";
export class AppModule {}
```
-### Setup with nonce
+#### Setup with nonce
The nonce attribute is useful to allow-list specific elements, such as a particular inline script or style elements. It can help you to avoid using the CSP unsafe-inline directive, which would allow-list all inline scripts or styles.
@@ -82,7 +71,7 @@ import { NgxPiwikProModule } from "@piwikpro/ngx-piwik-pro";
export class AppModule {}
```
-### Set up the Routing Module
+#### Set up the Routing Module
We provide a second Module Dependency to configure Router Event Bindings and perform automatic page views every time your application navigates to another page.
@@ -106,9 +95,9 @@ import { NgxPiwikProModule, NgxPiwikProRouterModule } from '@piwikpro/ngx-piwik-
export class AppModule {}
```
-### Advanced setup for the Routing Module
+#### Advanced setup for the Routing Module
-#### You can customize some rules to include/exclude routes on `NgxPiwikProRouterModule`. The include/exclude settings allow:
+##### You can customize some rules to include/exclude routes on `NgxPiwikProRouterModule`. The include/exclude settings allow:
- Simple route matching: `{ include: [ '/full-uri-match' ] }`;
- Wildcard route matching: `{ include: [ '*/public/*' ] }`;
@@ -130,7 +119,7 @@ import { NgxPiwikProModule, NgxPiwikProRouterModule } from '@piwikpro/ngx-piwik-
export class AppModule {}
```
-#### Track of PageViews from the first visit to the site.
+##### Track of PageViews from the first visit to the site.
The default 'Data Collection' settings assume that the 'Track page views in a single-page application' option is set to true. You will find an iformation that if this option is enabled, we will record every change in the state of the browser history on the page and report it as a page view in the reports. You need to know that this option should be disabled if you want to use the ngx-piwik-pro library.
@@ -155,9 +144,9 @@ import { NgxPiwikProModule, NgxPiwikProRouterModule } from '@piwikpro/ngx-piwik-
export class AppModule {}
```
-## Piwik PRO Services
+### Piwik PRO Services
-### Send Custom Events
+#### Send Custom Events
```ts
@Component( ... )
@@ -185,7 +174,7 @@ export class TestFormComponent {
```
-### Send page views and virtual page views
+#### Send page views and virtual page views
```ts
@Component(...)
@@ -202,7 +191,7 @@ export class TestPageComponent implements OnInit {
}
```
-### Send an event with Data Layer
+#### Send an event with Data Layer
```ts
@Component(...)
@@ -220,70 +209,106 @@ export class TestPageComponent implements OnInit {
```
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / content-tracking/content-tracking.service
-# content-tracking/content-tracking.service
+### Namespaces
+
+- [ContentTracking](#namespacescontenttrackingreadmemd)
+- [CookieManagement](#namespacescookiemanagementreadmemd)
+- [CustomDimensions](#namespacescustomdimensionsreadmemd)
+- [CustomEvent](#namespacescustomeventreadmemd)
+- [DataLayer](#namespacesdatalayerreadmemd)
+- [DownloadAndOutlink](#namespacesdownloadandoutlinkreadmemd)
+- [ErrorTracking](#namespaceserrortrackingreadmemd)
+- [GoalConversions](#namespacesgoalconversionsreadmemd)
+- [PageViews](#namespacespageviewsreadmemd)
+- [SiteSearch](#namespacessitesearchreadmemd)
+- [UserManagement](#namespacesusermanagementreadmemd)
+- [eCommerce](#namespacesecommercereadmemd)
+
+### Type Aliases
-## Index
+- [Dimensions](#type-aliasesdimensionsmd)
+- [InitOptions](#type-aliasesinitoptionsmd)
+- [PaymentInformation](#type-aliasespaymentinformationmd)
+- [Product](#type-aliasesproductmd)
+- [VisitorInfo](#type-aliasesvisitorinfomd)
-### Classes
+### Variables
-- [ContentTrackingService](#content-trackingcontent-trackingserviceclassescontenttrackingservicemd)
+- [default](#variablesdefaultmd)
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [content-tracking/content-tracking.service](#content-trackingcontent-trackingservicereadmemd) / ContentTrackingService
-# Class: ContentTrackingService
+## ContentTracking
-## Constructors
-### new ContentTrackingService()
-> **new ContentTrackingService**(): [`ContentTrackingService`](#content-trackingcontent-trackingserviceclassescontenttrackingservicemd)
+- [logAllContentBlocksOnPage](#namespacescontenttrackingfunctionslogallcontentblocksonpagemd)
+- [trackAllContentImpressions](#namespacescontenttrackingfunctionstrackallcontentimpressionsmd)
+- [trackContentImpression](#namespacescontenttrackingfunctionstrackcontentimpressionmd)
+- [trackContentImpressionsWithinNode](#namespacescontenttrackingfunctionstrackcontentimpressionswithinnodemd)
+- [trackContentInteraction](#namespacescontenttrackingfunctionstrackcontentinteractionmd)
+- [trackContentInteractionNode](#namespacescontenttrackingfunctionstrackcontentinteractionnodemd)
+- [trackVisibleContentImpressions](#namespacescontenttrackingfunctionstrackvisiblecontentimpressionsmd)
-#### Returns
-[`ContentTrackingService`](#content-trackingcontent-trackingserviceclassescontenttrackingservicemd)
+
-## Methods
-### logAllContentBlocksOnPage()
+***
+
+
+## logAllContentBlocksOnPage()
> **logAllContentBlocksOnPage**(): `void`
-#### Returns
+Print all content blocks to the console for debugging purposes
+
+### Returns
`void`
+
+
+
+
***
-### trackAllContentImpressions()
+
+## trackAllContentImpressions()
> **trackAllContentImpressions**(): `void`
-#### Returns
+Scans the entire DOM for content blocks and tracks impressions after all page
+elements load. It does not send duplicates on repeated calls unless
+trackPageView was called in between trackAllContentImpressions invocations
+
+### Returns
`void`
+
+
+
+
***
-### trackContentImpression()
+
+## trackContentImpression()
> **trackContentImpression**(`contentName`, `contentPiece`, `contentTarget`): `void`
-#### Parameters
+### Parameters
• **contentName**: `string`
@@ -291,375 +316,553 @@ export class TestPageComponent implements OnInit {
• **contentTarget**: `string`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### trackContentImpressionsWithinNode()
+
+## trackContentImpressionsWithinNode()
> **trackContentImpressionsWithinNode**(`domNode`): `void`
-#### Parameters
+### Parameters
• **domNode**: `Node`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### trackContentInteraction()
+
+## trackContentInteraction()
> **trackContentInteraction**(`contentInteraction`, `contentName`, `contentPiece`, `contentTarget`): `void`
-#### Parameters
+Tracks manual content interaction event
+
+### Parameters
• **contentInteraction**: `string`
+Type of interaction (e.g. "click")
+
• **contentName**: `string`
+Name of a content block
+
• **contentPiece**: `string`
+Name of the content that was displayed (e.g. link to an image)
+
• **contentTarget**: `string`
-#### Returns
+Where the content leads to (e.g. URL of some external website)
+
+### Returns
`void`
+
+
+
+
***
-### trackContentInteractionNode()
-> **trackContentInteractionNode**(`domNode`, `contentInteraction`): `void`
+## trackContentInteractionNode()
+
+> **trackContentInteractionNode**(`domNode`, `contentInteraction`?): `void`
-#### Parameters
+Tracks interaction with a block in domNode. Can be called from code placed in onclick attribute
+
+### Parameters
• **domNode**: `Node`
-• **contentInteraction**: `string`= `'Unknown'`
+Node marked as content block or containing content blocks. If content block can’t be found, nothing will tracked.
-#### Returns
+• **contentInteraction?**: `string`
-`void`
+Name of interaction (e.g. "click")
-***
+### Returns
-### trackVisibleContentImpressions()
+`void`
-> **trackVisibleContentImpressions**(`checkOnScroll`, `watchInterval`): `void`
-#### Parameters
+
-• **checkOnScroll**: `boolean`= `true`
-• **watchInterval**: `number`= `750`
+***
-#### Returns
-`void`
+## trackVisibleContentImpressions()
+> **trackVisibleContentImpressions**(`checkOnScroll`?, `watchInterval`?): `void`
-
+Scans DOM for all visible content blocks and tracks impressions
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
+### Parameters
-***
+• **checkOnScroll?**: `boolean`
-[@piwikpro/ngx-piwik-pro](#modulesmd) / cookie-management/cookie-management.service
+Whether to scan for visible content on scroll event
-# cookie-management/cookie-management.service
+• **watchInterval?**: `number`
-## Index
+Delay, in milliseconds, between scans for new visible content. Periodic checks can be disabled by passing 0
-### Classes
+### Returns
-- [CookieManagementService](#cookie-managementcookie-managementserviceclassescookiemanagementservicemd)
+`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [cookie-management/cookie-management.service](#cookie-managementcookie-managementservicereadmemd) / CookieManagementService
-# Class: CookieManagementService
+## CookieManagement
-## Constructors
-### new CookieManagementService()
-> **new CookieManagementService**(): [`CookieManagementService`](#cookie-managementcookie-managementserviceclassescookiemanagementservicemd)
+- [deleteCookies](#namespacescookiemanagementfunctionsdeletecookiesmd)
+- [disableCookies](#namespacescookiemanagementfunctionsdisablecookiesmd)
+- [enableCookies](#namespacescookiemanagementfunctionsenablecookiesmd)
+- [getConfigVisitorCookieTimeout](#namespacescookiemanagementfunctionsgetconfigvisitorcookietimeoutmd)
+- [getCookieDomain](#namespacescookiemanagementfunctionsgetcookiedomainmd)
+- [getCookiePath](#namespacescookiemanagementfunctionsgetcookiepathmd)
+- [getSessionCookieTimeout](#namespacescookiemanagementfunctionsgetsessioncookietimeoutmd)
+- [hasCookies](#namespacescookiemanagementfunctionshascookiesmd)
+- [setCookieDomain](#namespacescookiemanagementfunctionssetcookiedomainmd)
+- [setCookieNamePrefix](#namespacescookiemanagementfunctionssetcookienameprefixmd)
+- [setCookiePath](#namespacescookiemanagementfunctionssetcookiepathmd)
+- [setReferralCookieTimeout](#namespacescookiemanagementfunctionssetreferralcookietimeoutmd)
+- [setSecureCookie](#namespacescookiemanagementfunctionssetsecurecookiemd)
+- [setSessionCookieTimeout](#namespacescookiemanagementfunctionssetsessioncookietimeoutmd)
+- [setVisitorCookieTimeout](#namespacescookiemanagementfunctionssetvisitorcookietimeoutmd)
+- [setVisitorIdCookie](#namespacescookiemanagementfunctionssetvisitoridcookiemd)
-#### Returns
-[`CookieManagementService`](#cookie-managementcookie-managementserviceclassescookiemanagementservicemd)
+
+
+
+***
-## Methods
-### deleteCookies()
+## deleteCookies()
> **deleteCookies**(): `void`
-#### Returns
+Deletes existing tracking cookies on the next page view
+
+### Returns
`void`
+
+
+
+
***
-### disableCookies()
+
+## disableCookies()
> **disableCookies**(): `void`
-#### Returns
+Disables all first party cookies. Existing cookies will be deleted in the next page view
+
+### Returns
`void`
+
+
+
+
***
-### enableCookies()
+
+## enableCookies()
> **enableCookies**(): `void`
-#### Returns
+Enables all first party cookies. Cookies will be created on the next tracking request
+
+### Returns
`void`
+
+
+
+
***
-### hasCookies()
+
+## getConfigVisitorCookieTimeout()
+
+> **getConfigVisitorCookieTimeout**(): `Promise`\<`number`\>
+
+Returns expiration time of visitor cookies (in milliseconds)
+
+### Returns
+
+`Promise`\<`number`\>
+
+
+
+
+
+***
+
+
+## getCookieDomain()
+
+> **getCookieDomain**(): `Promise`\<`string`\>
+
+Returns domain of the analytics tracking cookies (set with setCookieDomain()).
+
+### Returns
+
+`Promise`\<`string`\>
+
+
+
+
+
+***
+
+
+## getCookiePath()
+
+> **getCookiePath**(): `Promise`\<`string`\>
+
+Returns the analytics tracking cookies path
+
+### Returns
+
+`Promise`\<`string`\>
+
+
+
+
+
+***
+
+
+## getSessionCookieTimeout()
+
+> **getSessionCookieTimeout**(): `Promise`\<`number`\>
+
+Returns expiration time of session cookies
+
+### Returns
+
+`Promise`\<`number`\>
+
+
+
+
+
+***
+
+
+## hasCookies()
> **hasCookies**(): `Promise`\<`boolean`\>
-#### Returns
+Returns true if cookies are enabled in this browser
+
+### Returns
`Promise`\<`boolean`\>
+
+
+
+
***
-### setCookieDomain()
+
+## setCookieDomain()
> **setCookieDomain**(`domain`): `void`
-#### Parameters
+Sets the domain for the analytics tracking cookies
+
+### Parameters
• **domain**: `string`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setCookieNamePrefix()
+
+## setCookieNamePrefix()
> **setCookieNamePrefix**(`prefix`): `void`
-#### Parameters
+Sets the prefix for analytics tracking cookies. Default is "_pk_".
+
+### Parameters
• **prefix**: `string`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setCookiePath()
+
+## setCookiePath()
> **setCookiePath**(`path`): `void`
-#### Parameters
+Sets the analytics tracking cookies path
+
+### Parameters
• **path**: `string`
-#### Returns
+### Returns
+
+`void`
+
+
+
+
+
+***
+
+
+## setReferralCookieTimeout()
+
+> **setReferralCookieTimeout**(`seconds`): `void`
+
+Sets the expiration time of referral cookies
+
+### Parameters
+
+• **seconds**: `number`
+
+### Returns
`void`
+
+
+
+
***
-### setSecureCookie()
+
+## setSecureCookie()
> **setSecureCookie**(`secure`): `void`
-#### Parameters
+Toggles the secure cookie flag on all first party cookies (if you are using HTTPS)
+
+### Parameters
• **secure**: `boolean`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setSessionCookieTimeout()
+
+## setSessionCookieTimeout()
> **setSessionCookieTimeout**(`seconds`): `void`
-#### Parameters
+Sets the expiration time of session cookies
+
+### Parameters
• **seconds**: `number`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setVisitorCookieTimeout()
+
+## setVisitorCookieTimeout()
> **setVisitorCookieTimeout**(`seconds`): `void`
-#### Parameters
+Sets the expiration time of visitor cookies
+
+### Parameters
• **seconds**: `number`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setVisitorIdCookie()
+
+## setVisitorIdCookie()
> **setVisitorIdCookie**(): `void`
-#### Returns
+Sets cookie containing [analytics ID](https://developers.piwik.pro/en/latest/glossary.html#term-analytics-id) in browser
+
+### Returns
`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / custom-dimensions/custom-dimensions.service
-# custom-dimensions/custom-dimensions.service
+## CustomDimensions
-## Index
-### Classes
-- [CustomDimensionsService](#custom-dimensionscustom-dimensionsserviceclassescustomdimensionsservicemd)
+- [deleteCustomDimension](#namespacescustomdimensionsfunctionsdeletecustomdimensionmd)
+- [getCustomDimensionValue](#namespacescustomdimensionsfunctionsgetcustomdimensionvaluemd)
+- [setCustomDimensionValue](#namespacescustomdimensionsfunctionssetcustomdimensionvaluemd)
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [custom-dimensions/custom-dimensions.service](#custom-dimensionscustom-dimensionsservicereadmemd) / CustomDimensionsService
-# Class: CustomDimensionsService
+## deleteCustomDimension()
-## Constructors
-
-### new CustomDimensionsService()
+> **deleteCustomDimension**(`customDimensionId`): `void`
-> **new CustomDimensionsService**(): [`CustomDimensionsService`](#custom-dimensionscustom-dimensionsserviceclassescustomdimensionsservicemd)
+Removes a custom dimension with the specified ID.
-#### Returns
+### Parameters
-[`CustomDimensionsService`](#custom-dimensionscustom-dimensionsserviceclassescustomdimensionsservicemd)
+• **customDimensionId**: `string` \| `number`
-## Methods
+### Returns
-### deleteCustomDimension()
+`void`
-> **deleteCustomDimension**(`customDimensionId`): `void`
-#### Parameters
+
-• **customDimensionId**: `string`
-#### Returns
+***
-`void`
-***
+## getCustomDimensionValue()
-### getCustomDimensionValue()
+> **getCustomDimensionValue**(`customDimensionId`): `Promise`\<`string` \| `undefined`\>
-> **getCustomDimensionValue**(`customDimensionId`): `Promise`\<`undefined` \| `string`\>
+Returns the value of a custom dimension with the specified ID.
-#### Parameters
+### Parameters
• **customDimensionId**: `string` \| `number`
-#### Returns
+### Returns
+
+`Promise`\<`string` \| `undefined`\>
+
+
+
-`Promise`\<`undefined` \| `string`\>
***
-### setCustomDimensionValue()
+
+## setCustomDimensionValue()
> **setCustomDimensionValue**(`customDimensionId`, `customDimensionValue`): `void`
-#### Parameters
+Sets a custom dimension value to be used later.
+
+### Parameters
• **customDimensionId**: `string` \| `number`
• **customDimensionValue**: `string`
-#### Returns
+### Returns
`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / custom-event/custom-events.service
-# custom-event/custom-events.service
+## CustomEvent
-## Index
-### Classes
-- [CustomEventsService](#custom-eventcustom-eventsserviceclassescustomeventsservicemd)
+- [trackEvent](#namespacescustomeventfunctionstrackeventmd)
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [custom-event/custom-events.service](#custom-eventcustom-eventsservicereadmemd) / CustomEventsService
-# Class: CustomEventsService
+## trackEvent()
-## Constructors
+> **trackEvent**(`category`, `action`, `name`?, `value`?, `dimensions`?): `void`
-### new CustomEventsService()
+Tracks a custom event, e.g. when a visitor interacts with the page
-> **new CustomEventsService**(): [`CustomEventsService`](#custom-eventcustom-eventsserviceclassescustomeventsservicemd)
-
-#### Returns
-
-[`CustomEventsService`](#custom-eventcustom-eventsserviceclassescustomeventsservicemd)
-
-## Methods
-
-### trackEvent()
-
-> **trackEvent**(`category`, `action`, `name`?, `value`?): `void`
-
-#### Parameters
+### Parameters
• **category**: `string`
@@ -669,855 +872,1050 @@ export class TestPageComponent implements OnInit {
• **value?**: `number`
-#### Returns
+• **dimensions?**: [`Dimensions`](#type-aliasesdimensionsmd)
+
+### Returns
`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / data-layer/data-layer.service
-# data-layer/data-layer.service
+## DataLayer
-## Index
-### Classes
+#### Type Aliases
-- [DataLayerService](#data-layerdata-layerserviceclassesdatalayerservicemd)
+- [DataLayerEntry](#namespacesdatalayertype-aliasesdatalayerentrymd)
-
+- [push](#namespacesdatalayerfunctionspushmd)
+- [setDataLayerName](#namespacesdatalayerfunctionssetdatalayernamemd)
+
+
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [data-layer/data-layer.service](#data-layerdata-layerservicereadmemd) / DataLayerService
-# Class: DataLayerService
+## push()
-## Constructors
+> **push**(`data`): `number`
-### new DataLayerService()
+Adds entry to a data layer
-> **new DataLayerService**(): [`DataLayerService`](#data-layerdata-layerserviceclassesdatalayerservicemd)
+### Parameters
-#### Returns
+• **data**: [`DataLayerEntry`](#namespacesdatalayertype-aliasesdatalayerentrymd)
-[`DataLayerService`](#data-layerdata-layerserviceclassesdatalayerservicemd)
+### Returns
-## Methods
+`number`
-### push()
-> **push**(`data`): `number`
+
-#### Parameters
-• **data**: `any`
+***
-#### Returns
-`number`
+## setDataLayerName()
+> **setDataLayerName**(`name`): `void`
-
+### Parameters
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
+• **name**: `string`
-***
+### Returns
+
+`void`
-[@piwikpro/ngx-piwik-pro](#modulesmd) / download-and-outlink/download-and-outlink.service
-# download-and-outlink/download-and-outlink.service
+
-## Index
-### Classes
+***
+
-- [DownloadAndOutlinkService](#download-and-outlinkdownload-and-outlinkserviceclassesdownloadandoutlinkservicemd)
+## Type alias: DataLayerEntry
+> **DataLayerEntry**: `Record`\<`string`, `AnyData`\>
-
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
+
+
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [download-and-outlink/download-and-outlink.service](#download-and-outlinkdownload-and-outlinkservicereadmemd) / DownloadAndOutlinkService
-# Class: DownloadAndOutlinkService
+## DownloadAndOutlink
+
+
-## Constructors
+- [addDownloadExtensions](#namespacesdownloadandoutlinkfunctionsadddownloadextensionsmd)
+- [enableLinkTracking](#namespacesdownloadandoutlinkfunctionsenablelinktrackingmd)
+- [getLinkTrackingTimer](#namespacesdownloadandoutlinkfunctionsgetlinktrackingtimermd)
+- [removeDownloadExtensions](#namespacesdownloadandoutlinkfunctionsremovedownloadextensionsmd)
+- [setDownloadClasses](#namespacesdownloadandoutlinkfunctionssetdownloadclassesmd)
+- [setDownloadExtensions](#namespacesdownloadandoutlinkfunctionssetdownloadextensionsmd)
+- [setIgnoreClasses](#namespacesdownloadandoutlinkfunctionssetignoreclassesmd)
+- [setLinkClasses](#namespacesdownloadandoutlinkfunctionssetlinkclassesmd)
+- [setLinkTrackingTimer](#namespacesdownloadandoutlinkfunctionssetlinktrackingtimermd)
+- [trackLink](#namespacesdownloadandoutlinkfunctionstracklinkmd)
-### new DownloadAndOutlinkService()
-> **new DownloadAndOutlinkService**(): [`DownloadAndOutlinkService`](#download-and-outlinkdownload-and-outlinkserviceclassesdownloadandoutlinkservicemd)
+
-#### Returns
-[`DownloadAndOutlinkService`](#download-and-outlinkdownload-and-outlinkserviceclassesdownloadandoutlinkservicemd)
+***
-## Methods
-### addDownloadExtensions()
+## addDownloadExtensions()
> **addDownloadExtensions**(`extensions`): `void`
-#### Parameters
+Adds new extensions to the download extensions list
+
+### Parameters
• **extensions**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### enableLinkTracking()
-> **enableLinkTracking**(`enable`): `void`
+## enableLinkTracking()
+
+> **enableLinkTracking**(`trackAlsoMiddleAndRightClicks`?): `void`
-#### Parameters
+Enables automatic link tracking. If called with `true`, left, right and
+middle clicks on links will be treated as opening a link. Opening a links to
+an external site (different domain) creates an outlink event. Opening a link
+to a downloadable file creates a download event
-• **enable**: `boolean`
+### Parameters
-#### Returns
+• **trackAlsoMiddleAndRightClicks?**: `boolean`
+
+### Returns
`void`
+
+
+
+
***
-### getLinkTrackingTimer()
+
+## getLinkTrackingTimer()
> **getLinkTrackingTimer**(): `Promise`\<`number`\>
-#### Returns
+Returns lock/wait time after a request set by setLinkTrackingTimer
+
+### Returns
`Promise`\<`number`\>
+
+
+
+
***
-### removeDownloadExtensions()
+
+## removeDownloadExtensions()
> **removeDownloadExtensions**(`extensions`): `void`
-#### Parameters
+Removes extensions from the download extensions list
+
+### Parameters
• **extensions**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setDownloadClasses()
+
+## setDownloadClasses()
> **setDownloadClasses**(`classes`): `void`
-#### Parameters
+Sets a list of class names that indicate whether a list is a download and not an outlink
+
+### Parameters
• **classes**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setDownloadExtensions()
+
+## setDownloadExtensions()
> **setDownloadExtensions**(`extensions`): `void`
-#### Parameters
+Overwrites the list of file extensions indicating that a link is a download
+
+### Parameters
• **extensions**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setIgnoreClasses()
+
+## setIgnoreClasses()
> **setIgnoreClasses**(`classes`): `void`
-#### Parameters
+Set a list of class names that indicate a link should not be tracked
+
+### Parameters
• **classes**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setLinkClasses()
+
+## setLinkClasses()
> **setLinkClasses**(`classes`): `void`
-#### Parameters
+Sets a list of class names that indicate whether a link is an outlink and not download
+
+### Parameters
• **classes**: `string`[]
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### setLinkTrackingTimer()
+
+## setLinkTrackingTimer()
> **setLinkTrackingTimer**(`time`): `void`
-#### Parameters
+When a visitor produces an events and closes the page immediately afterwards,
+e.g. when opening a link, the request might get cancelled. To avoid loosing
+the last event this way, JavaScript Tracking Client will lock the page for a
+fraction of a second (if wait time hasn’t passed), giving the request time to
+reach the Collecting & Processing Pipeline
+
+### Parameters
• **time**: `number`
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### trackLink()
-> **trackLink**(`url`, `linkType`, `customData`?, `callback`?): `void`
+## trackLink()
+
+> **trackLink**(`url`, `linkType`, `dimensions`?, `callback`?): `void`
-#### Parameters
+Manually tracks outlink or download event with provided values
+
+### Parameters
• **url**: `string`
• **linkType**: `string`
-• **customData?**: `Dimensions`
+• **dimensions?**: [`Dimensions`](#type-aliasesdimensionsmd)
• **callback?**
-#### Returns
+### Returns
`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / e-commerce/e-commerce.service
-# e-commerce/e-commerce.service
+## ErrorTracking
-## Index
-### Classes
-- [ECommerceService](#e-commercee-commerceserviceclassesecommerceservicemd)
+- [enableJSErrorTracking](#namespaceserrortrackingfunctionsenablejserrortrackingmd)
+- [trackError](#namespaceserrortrackingfunctionstrackerrormd)
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [e-commerce/e-commerce.service](#e-commercee-commerceservicereadmemd) / ECommerceService
-# Class: ECommerceService
+## enableJSErrorTracking()
-## Constructors
+> **enableJSErrorTracking**(`unique`?): `void`
-### new ECommerceService()
+Enables tracking of unhandled JavaScript errors.
-> **new ECommerceService**(`paqService`): [`ECommerceService`](#e-commercee-commerceserviceclassesecommerceservicemd)
+### Parameters
-#### Parameters
+• **unique?**: `boolean`
-• **paqService**: [`PaqService`](#paqpaqserviceclassespaqservicemd)
+track only unique errors
-#### Returns
+### Returns
-[`ECommerceService`](#e-commercee-commerceserviceclassesecommerceservicemd)
+`void`
-## Properties
-### paqService
+
-> `private` `readonly` **paqService**: [`PaqService`](#paqpaqserviceclassespaqservicemd)
-## Methods
+***
-### ~~addEcommerceItem()~~
-> **addEcommerceItem**(`productSKU`, `productName`, `productCategory`, `productPrice`, `productQuantity`): `void`
+## trackError()
-#### Parameters
+> **trackError**(`error`): `void`
-• **productSKU**: `string`
+Attempts to send error tracking request using same format as native errors caught by enableJSErrorTracking().
+Such error request will still follow rules set for tracker, so it will be sent only when JS error tracking is enabled
+([enableJSErrorTracking](#namespaceserrortrackingfunctionsenablejserrortrackingmd) function was called before this attempt). It will also respect rules for tracking only unique errors.
-• **productName**: `string`
+### Parameters
-• **productCategory**: `string` \| `string`[]
+• **error**: `Error`
-• **productPrice**: `number`
+### Returns
-• **productQuantity**: `number`
+`void`
-#### Returns
-`void`
+
-#### Deprecated
-Please use the ecommerceAddToCart instead.
+***
+
+
+## GoalConversions
+
+
+
+- [trackGoal](#namespacesgoalconversionsfunctionstrackgoalmd)
+
+
+
+
***
-### ~~clearEcommerceCart()~~
-> **clearEcommerceCart**(): `void`
+## trackGoal()
+
+> **trackGoal**(`goalId`, `conversionValue`, `dimensions`?): `void`
+
+Tracks manual goal conversion
+
+### Parameters
+
+• **goalId**: `string` \| `number`
-#### Returns
+• **conversionValue**: `number`
+
+• **dimensions?**: [`Dimensions`](#type-aliasesdimensionsmd)
+
+### Returns
`void`
-#### Deprecated
+
+
+
***
-### ecommerceAddToCart()
-> **ecommerceAddToCart**(`products`): `void`
+## PageViews
-#### Parameters
-• **products**: `Product`[]
-#### Returns
+- [trackPageView](#namespacespageviewsfunctionstrackpageviewmd)
+
+
+
-`void`
***
-### ecommerceCartUpdate()
-> **ecommerceCartUpdate**(`products`, `grandTotal`): `void`
+## trackPageView()
-#### Parameters
+> **trackPageView**(`customPageTitle`?): `void`
-• **products**: `Product`[]
+Tracks a visit on the page that the function was run on
-• **grandTotal**: `string` \| `number`
+### Parameters
-#### Returns
+• **customPageTitle?**: `string`
+
+### Returns
`void`
+
+
+
+
***
-### ecommerceOrder()
-> **ecommerceOrder**(`products`, `paymentInformation`): `void`
+## SiteSearch
-#### Parameters
-• **products**: `Product`[]
-• **paymentInformation**: `PaymentInformation`
+- [trackSiteSearch](#namespacessitesearchfunctionstracksitesearchmd)
-#### Returns
-`void`
+
+
***
-### ecommerceProductDetailView()
-> **ecommerceProductDetailView**(`products`): `void`
+## trackSiteSearch()
+
+> **trackSiteSearch**(`keyword`, `category`?, `searchCount`?, `dimensions`?): `void`
-#### Parameters
+Tracks search requests on a website
+
+### Parameters
+
+• **keyword**: `string`
+
+• **category?**: `string`
+
+• **searchCount?**: `number`
-• **products**: `Product`[]
+• **dimensions?**: [`Dimensions`](#type-aliasesdimensionsmd)
-#### Returns
+### Returns
`void`
+
+
+
+
***
-### ecommerceRemoveFromCart()
-> **ecommerceRemoveFromCart**(`products`): `void`
+## UserManagement
-#### Parameters
-• **products**: `Product`[]
-#### Returns
+- [getUserId](#namespacesusermanagementfunctionsgetuseridmd)
+- [getVisitorId](#namespacesusermanagementfunctionsgetvisitoridmd)
+- [getVisitorInfo](#namespacesusermanagementfunctionsgetvisitorinfomd)
+- [resetUserId](#namespacesusermanagementfunctionsresetuseridmd)
+- [setUserId](#namespacesusermanagementfunctionssetuseridmd)
+
+
+
-`void`
***
-### ~~getEcommerceItems()~~
-> **getEcommerceItems**(): `Promise`\<`object`\>
+## getUserId()
-#### Returns
+> **getUserId**(): `Promise`\<`string`\>
-`Promise`\<`object`\>
+The function that will return user ID
+
+### Returns
+
+`Promise`\<`string`\>
+
+
+
-#### Deprecated
***
-### ~~removeEcommerceItem()~~
-> **removeEcommerceItem**(`productSKU`): `void`
+## getVisitorId()
-#### Parameters
+> **getVisitorId**(): `Promise`\<`string`\>
-• **productSKU**: `string`
+Returns 16-character hex ID of the visitor
-#### Returns
+### Returns
-`void`
+`Promise`\<`string`\>
-#### Deprecated
-Please use the ecommerceRemoveFromCart instead.
+
+
***
-### ~~setEcommerceView()~~
-> **setEcommerceView**(`productSKU`, `productName`?, `productCategory`?, `productPrice`?): `void`
+## getVisitorInfo()
-#### Parameters
+> **getVisitorInfo**(): `Promise`\<[`VisitorInfo`](#type-aliasesvisitorinfomd)\>
-• **productSKU**: `string`
+Returns visitor information in an array
-• **productName?**: `string`
+### Returns
-• **productCategory?**: `string`[]
+`Promise`\<[`VisitorInfo`](#type-aliasesvisitorinfomd)\>
-• **productPrice?**: `string`
-#### Returns
+
+
+
+***
+
+
+## resetUserId()
+
+> **resetUserId**(): `void`
+
+Clears previously set userID, e.g. when visitor logs out
+
+### Returns
`void`
-#### Deprecated
+
+
+
***
-### ~~trackEcommerceCartUpdate()~~
-> **trackEcommerceCartUpdate**(`cartAmount`): `void`
+## setUserId()
-#### Parameters
+> **setUserId**(`userId`): `void`
-• **cartAmount**: `number`
+User ID is an additional parameter that allows you to aggregate data. When
+set up, you will be able to search through sessions by this parameter, filter
+reports through it or create Multi attribution reports using User ID
-#### Returns
+### Parameters
+
+• **userId**: `string`
+
+### Returns
`void`
-#### Deprecated
-Please use the ecommerceCartUpdate instead.
+
+
***
-### ~~trackEcommerceOrder()~~
-> **trackEcommerceOrder**(`orderId`, `orderGrandTotal`, `orderSubTotal`?, `orderTax`?, `orderShipping`?, `orderDiscount`?): `void`
+## eCommerce
-#### Parameters
-• **orderId**: `string`
-• **orderGrandTotal**: `number`
+- [addEcommerceItem](#namespacesecommercefunctionsaddecommerceitemmd)
+- [clearEcommerceCart](#namespacesecommercefunctionsclearecommercecartmd)
+- [ecommerceAddToCart](#namespacesecommercefunctionsecommerceaddtocartmd)
+- [ecommerceCartUpdate](#namespacesecommercefunctionsecommercecartupdatemd)
+- [ecommerceOrder](#namespacesecommercefunctionsecommerceordermd)
+- [ecommerceProductDetailView](#namespacesecommercefunctionsecommerceproductdetailviewmd)
+- [ecommerceRemoveFromCart](#namespacesecommercefunctionsecommerceremovefromcartmd)
+- [getEcommerceItems](#namespacesecommercefunctionsgetecommerceitemsmd)
+- [removeEcommerceItem](#namespacesecommercefunctionsremoveecommerceitemmd)
+- [setEcommerceView](#namespacesecommercefunctionssetecommerceviewmd)
+- [trackEcommerceCartUpdate](#namespacesecommercefunctionstrackecommercecartupdatemd)
+- [trackEcommerceOrder](#namespacesecommercefunctionstrackecommerceordermd)
-• **orderSubTotal?**: `number`
-• **orderTax?**: `number`
+
-• **orderShipping?**: `number`
-• **orderDiscount?**: `number`
+***
+
-#### Returns
+## ~~addEcommerceItem()~~
+
+> **addEcommerceItem**(`productSKU`, `productName`, `productCategory`, `productPrice`, `productQuantity`): `void`
+
+### Parameters
+
+• **productSKU**: `string`
+
+• **productName**: `string`
+
+• **productCategory**: `string` \| `string`[]
+
+• **productPrice**: `number`
+
+• **productQuantity**: `number`
+
+### Returns
`void`
-#### Deprecated
+### Deprecated
-Please use the ecommerceOrder instead.
+Please use the ecommerceAddToCart instead.
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / goal-conversions/goal-conversions.service
-# goal-conversions/goal-conversions.service
+## ~~clearEcommerceCart()~~
-## Index
+> **clearEcommerceCart**(): `void`
-### Classes
+### Returns
-- [GoalConversionsService](#goal-conversionsgoal-conversionsserviceclassesgoalconversionsservicemd)
+`void`
+
+### Deprecated
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [goal-conversions/goal-conversions.service](#goal-conversionsgoal-conversionsservicereadmemd) / GoalConversionsService
-# Class: GoalConversionsService
+## ecommerceAddToCart()
+
+> **ecommerceAddToCart**(`products`): `void`
+
+Tracks action of adding products to a cart
-## Constructors
+### Parameters
-### new GoalConversionsService()
+• **products**: [`Product`](#type-aliasesproductmd)[]
-> **new GoalConversionsService**(): [`GoalConversionsService`](#goal-conversionsgoal-conversionsserviceclassesgoalconversionsservicemd)
+### Returns
-#### Returns
+`void`
-[`GoalConversionsService`](#goal-conversionsgoal-conversionsserviceclassesgoalconversionsservicemd)
-## Methods
+
-### trackGoal()
-> **trackGoal**(`goalId`, `conversionValue`, `dimensions`?): `void`
+***
-#### Parameters
-• **goalId**: `string` \| `number`
+## ecommerceCartUpdate()
-• **conversionValue**: `number`
+> **ecommerceCartUpdate**(`products`, `grandTotal`): `void`
-• **dimensions?**: `Dimensions`
+Tracks current state of a cart
-#### Returns
+### Parameters
+
+• **products**: [`Product`](#type-aliasesproductmd)[]
+
+• **grandTotal**: `string` \| `number`
+
+### Returns
`void`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-## Modules
+## ecommerceOrder()
+
+> **ecommerceOrder**(`products`, `paymentInformation`): `void`
+
+Tracks conversion, including products and payment details
-- [content-tracking/content-tracking.service](#content-trackingcontent-trackingservicereadmemd)
-- [cookie-management/cookie-management.service](#cookie-managementcookie-managementservicereadmemd)
-- [custom-dimensions/custom-dimensions.service](#custom-dimensionscustom-dimensionsservicereadmemd)
-- [custom-event/custom-events.service](#custom-eventcustom-eventsservicereadmemd)
-- [data-layer/data-layer.service](#data-layerdata-layerservicereadmemd)
-- [download-and-outlink/download-and-outlink.service](#download-and-outlinkdownload-and-outlinkservicereadmemd)
-- [e-commerce/e-commerce.service](#e-commercee-commerceservicereadmemd)
-- [goal-conversions/goal-conversions.service](#goal-conversionsgoal-conversionsservicereadmemd)
-- [page-views/page-views.service](#page-viewspage-viewsservicereadmemd)
-- [paq/paq.service](#paqpaqservicereadmemd)
-- [site-search/site-search.service](#site-searchsite-searchservicereadmemd)
-- [user-management/user-management.service](#user-managementuser-managementservicereadmemd)
+### Parameters
+• **products**: [`Product`](#type-aliasesproductmd)[]
-
+• **paymentInformation**: [`PaymentInformation`](#type-aliasespaymentinformationmd)
+
+### Returns
+
+`void`
+
+
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / page-views/page-views.service
-# page-views/page-views.service
+## ecommerceProductDetailView()
+
+> **ecommerceProductDetailView**(`products`): `void`
-## Index
+Tracks action of viewing product page
-### Classes
+### Parameters
-- [PageViewsService](#page-viewspage-viewsserviceclassespageviewsservicemd)
+• **products**: [`Product`](#type-aliasesproductmd)[]
+### Returns
-
+`void`
+
+
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [page-views/page-views.service](#page-viewspage-viewsservicereadmemd) / PageViewsService
-# Class: PageViewsService
+## ecommerceRemoveFromCart()
-## Constructors
+> **ecommerceRemoveFromCart**(`products`): `void`
-### new PageViewsService()
+Tracks action of removing a products from a cart
-> **new PageViewsService**(): [`PageViewsService`](#page-viewspage-viewsserviceclassespageviewsservicemd)
+### Parameters
-#### Returns
+• **products**: [`Product`](#type-aliasesproductmd)[]
-[`PageViewsService`](#page-viewspage-viewsserviceclassespageviewsservicemd)
+### Returns
-## Methods
+`void`
-### trackPageView()
-> **trackPageView**(`customPageTitle`?): `void`
+
-#### Parameters
-• **customPageTitle?**: `string`
+***
-#### Returns
-`void`
+## ~~getEcommerceItems()~~
+
+> **getEcommerceItems**(): `Promise`\<`object`\>
+
+### Returns
+
+`Promise`\<`object`\>
+
+### Deprecated
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / paq/paq.service
-# paq/paq.service
+## ~~removeEcommerceItem()~~
-## Index
+> **removeEcommerceItem**(`productSKU`): `void`
+
+### Parameters
+
+• **productSKU**: `string`
+
+### Returns
+
+`void`
-### Classes
+### Deprecated
-- [PaqService](#paqpaqserviceclassespaqservicemd)
+Please use the ecommerceRemoveFromCart instead.
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [paq/paq.service](#paqpaqservicereadmemd) / PaqService
-# Class: PaqService
+## ~~setEcommerceView()~~
-## Constructors
+> **setEcommerceView**(`productSKU`, `productName`?, `productCategory`?, `productPrice`?): `void`
-### new PaqService()
+### Parameters
-> **new PaqService**(`titleService`, `routerService`, `_window`): [`PaqService`](#paqpaqserviceclassespaqservicemd)
+• **productSKU**: `string`
-#### Parameters
+• **productName?**: `string`
-• **titleService**: `Title`
+• **productCategory?**: `string`[]
-• **routerService**: `Router`
+• **productPrice?**: `string`
-• **\_window**: `PiwikProWindow`
+### Returns
-#### Returns
+`void`
-[`PaqService`](#paqpaqserviceclassespaqservicemd)
+### Deprecated
-## Properties
-### \_window
+
-> `private` `readonly` **\_window**: `PiwikProWindow`
***
-### routerService
-> `private` `readonly` **routerService**: `Router`
+## ~~trackEcommerceCartUpdate()~~
+
+> **trackEcommerceCartUpdate**(`cartAmount`): `void`
+
+### Parameters
+
+• **cartAmount**: `number`
+
+### Returns
+
+`void`
+
+### Deprecated
+
+Please use the ecommerceCartUpdate instead.
+
+
+
+
***
-### titleService
-> `private` `readonly` **titleService**: `Title`
+## ~~trackEcommerceOrder()~~
-## Methods
+> **trackEcommerceOrder**(`orderId`, `orderGrandTotal`, `orderSubTotal`?, `orderTax`?, `orderShipping`?, `orderDiscount`?): `void`
-### push()
+### Parameters
-> **push**(`collection`): `any`
+• **orderId**: `string`
-#### Parameters
+• **orderGrandTotal**: `number`
-• **collection**: `any`[]
+• **orderSubTotal?**: `number`
-#### Returns
+• **orderTax?**: `number`
-`any`
+• **orderShipping?**: `number`
+• **orderDiscount?**: `number`
-
+### Returns
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
+`void`
-***
+### Deprecated
+
+Please use the ecommerceOrder instead.
+
+
+
-[@piwikpro/ngx-piwik-pro](#modulesmd) / site-search/site-search.service
-# site-search/site-search.service
+***
-## Index
-### Classes
+## Type alias: Dimensions
-- [SiteSearchService](#site-searchsite-searchserviceclassessitesearchservicemd)
+> **Dimensions**: `Record`\<\`dimension$\{number\}\`, `string`\>
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [site-search/site-search.service](#site-searchsite-searchservicereadmemd) / SiteSearchService
-# Class: SiteSearchService
+## Type alias: InitOptions
-## Constructors
+> **InitOptions**: `object`
-### new SiteSearchService()
+### Type declaration
-> **new SiteSearchService**(): [`SiteSearchService`](#site-searchsite-searchserviceclassessitesearchservicemd)
+#### dataLayerName?
-#### Returns
+> `optional` **dataLayerName**: `string`
-[`SiteSearchService`](#site-searchsite-searchserviceclassessitesearchservicemd)
+Defaults to 'dataLayer'
-## Methods
+#### nonce?
-### trackSiteSearch()
+> `optional` **nonce**: `string`
-> **trackSiteSearch**(`keyword`, `category`?, `searchCount`?, `dimensions`?): `void`
-#### Parameters
+
-• **keyword**: `string`
-• **category?**: `string`
+***
-• **searchCount?**: `number`
-• **dimensions?**: `Dimensions`
+## Type alias: PaymentInformation
-#### Returns
+> **PaymentInformation**: `object`
-`void`
+### Type declaration
+#### discount?
-
+> `optional` **discount**: `number` \| `string`
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
+#### grandTotal
-***
+> **grandTotal**: `number` \| `string`
+
+#### orderId
+
+> **orderId**: `string`
+
+#### shipping?
-[@piwikpro/ngx-piwik-pro](#modulesmd) / user-management/user-management.service
+> `optional` **shipping**: `number` \| `string`
-# user-management/user-management.service
+#### subTotal?
-## Index
+> `optional` **subTotal**: `number` \| `string`
-### Classes
+#### tax?
-- [UserManagementService](#user-managementuser-managementserviceclassesusermanagementservicemd)
+> `optional` **tax**: `number` \| `string`
-
+
-[**@piwikpro/ngx-piwik-pro**](#readmemd) • **Docs**
***
-[@piwikpro/ngx-piwik-pro](#modulesmd) / [user-management/user-management.service](#user-managementuser-managementservicereadmemd) / UserManagementService
-# Class: UserManagementService
+## Type alias: Product
-## Constructors
+> **Product**: `object`
-### new UserManagementService()
+### Type declaration
-> **new UserManagementService**(): [`UserManagementService`](#user-managementuser-managementserviceclassesusermanagementservicemd)
+#### brand?
-#### Returns
+> `optional` **brand**: `string`
-[`UserManagementService`](#user-managementuser-managementserviceclassesusermanagementservicemd)
+#### category?
-## Methods
+> `optional` **category**: `LimitedArrayFiveStrings`
-### getUserId()
+#### customDimensions?
-> **getUserId**(): `Promise`\<`string`\>
+> `optional` **customDimensions**: `Record`\<`number`, `string`\>
-#### Returns
+#### name?
-`Promise`\<`string`\>
+> `optional` **name**: `string`
-***
+#### price?
-### getVisitorId()
+> `optional` **price**: `number`
-> **getVisitorId**(): `Promise`\<`any`\>
+#### quantity?
-#### Returns
+> `optional` **quantity**: `number`
-`Promise`\<`any`\>
+#### sku
-***
+> **sku**: `string`
-### getVisitorInfo()
+#### variant?
-> **getVisitorInfo**(): `Promise`\<`any`[]\>
+> `optional` **variant**: `string`
-#### Returns
-`Promise`\<`any`[]\>
+
+
***
-### resetUserId()
-> **resetUserId**(): `void`
+## Type alias: VisitorInfo
-#### Returns
+> **VisitorInfo**: [`"0"` \| `"1"`, `string`, `number`, `string` \| `number`, `number`, `number` \| `""`, `number` \| `""`]
+
+
+
-`void`
***
-### setUserId()
-> **setUserId**(`userId`): `void`
+## Variable: default
-#### Parameters
+> `const` **default**: `object`
-• **userId**: `string`
+### Type declaration
-#### Returns
+#### getInitScript
-`void`
+> **getInitScript**: *typeof* `PiwikPro.getInitScript`
+
+#### initialize
+
+> **initialize**: *typeof* `PiwikPro.init`
diff --git a/package.json b/package.json
index 0a8a110..c6d45c2 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
"test": "ng test ngx-piwik-pro --no-watch --no-progress --browsers=ChromeHeadless",
"test:dev": "ng test ngx-piwik-pro",
"lint": "ng lint ngx-piwik-pro",
- "build:docs": "typedoc && concat-md docs_raw > README.md && node scripts/postProcessDocs.mjs"
+ "build:docs": "typedoc && concat-md --decrease-title-levels --start-title-level-at=2 docs_raw > README.md && node scripts/postProcessDocs.mjs"
},
"private": false,
"repository": "https://github.com/PiwikPRO/ngx-piwik-pro",
diff --git a/scripts/postProcessDocs.mjs b/scripts/postProcessDocs.mjs
index 16b1992..33729bb 100644
--- a/scripts/postProcessDocs.mjs
+++ b/scripts/postProcessDocs.mjs
@@ -1,33 +1,28 @@
-import { readFileSync, writeFileSync } from 'node:fs'
+import { readFileSync, writeFileSync } from "node:fs";
-const README = 'README.md'
+const README = "README.md";
-const file = readFileSync(README, 'utf-8')
+const file = readFileSync(README, "utf-8");
const formattedOutput = file
- .split('\n')
- // remove additional headings
+ .split("\n")
+ // remove links suited for multi page documentation
+ .filter((line) => !line.includes("@piwikpro/tracking-base-library"))
+ // remove duplicated headers
.filter(
- (line) =>
- !line.includes('# @piwikpro/ngx-piwik-pro') &&
- !line.includes('@piwikpro/ngx-piwik-pro / [Modules](#modulesmd)') &&
- !line.includes('[@piwikpro/ngx-piwik-pro](#readmemd)')
+ (line) => !line.includes("#### Functions") && !line.includes("### Index")
)
- // remove links suited for multi page documentation
- .filter((line) => !line.includes('Exports'))
- // remove duplicated header
- .filter((line) => !line.includes('### Functions'))
- // remove remove additional prefix
- .filter((line) => !line.includes('node\\_modules'))
- .map((line) => line.replace('Namespace: ', ''))
- .join('\n')
- // NOTE: top level table of contents is placed at the bottom for some reason
- // and needs to be manually (for now) placed at the top
- .replace(`## Table of contents
-
-### Modules
-
-- [src](#modulessrcmd)
-`,"")
+ // remove remove additional prefixes
+ .map((line) => line.replace("Namespace: ", ""))
+ .map((line) => line.replace("Function: ", ""))
+ // increase heading level for the title
+ .map((line) =>
+ line.replace(
+ "## Piwik PRO Library for Angular",
+ "# Piwik PRO Library for Angular"
+ )
+ )
+ .join("\n")
+ .replace("***", "");
-writeFileSync(README, formattedOutput)
+writeFileSync(README, formattedOutput);
diff --git a/typedoc.json b/typedoc.json
index 9732084..db32f80 100644
--- a/typedoc.json
+++ b/typedoc.json
@@ -1,21 +1,10 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": [
- "./projects/ngx-piwik-pro/src/lib/services/paq/paq.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/page-views/page-views.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/content-tracking/content-tracking.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/cookie-management/cookie-management.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/custom-dimensions/custom-dimensions.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/site-search/site-search.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/custom-event/custom-events.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/download-and-outlink/download-and-outlink.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/e-commerce/e-commerce.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/goal-conversions/goal-conversions.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/user-management/user-management.service.ts",
- "./projects/ngx-piwik-pro/src/lib/services/data-layer/data-layer.service.ts",
+ "node_modules/@piwikpro/tracking-base-library/dist/index.d.ts"
],
"out": "docs_raw",
"plugin": ["typedoc-plugin-markdown"],
"readme": "docs/README_BASE.md",
- "disableSources": true,
+ "disableSources": true
}