ngx-matomo-client
Advanced tools
Comparing version 5.0.4 to 5.1.0
@@ -12,2 +12,7 @@ import { OnChanges, OnInit, SimpleChanges } from '@angular/core'; | ||
* component! | ||
* | ||
* Note: This component relies on the matomo-generated opt-out form, which is deprecated | ||
* since Matomo version 4.12.0. It will be marked as deprecated soon. | ||
* | ||
* @see https://developer.matomo.org/changelog#new-privacy-opt-out-options | ||
*/ | ||
@@ -17,3 +22,4 @@ export declare class MatomoOptOutFormComponent implements OnInit, OnChanges { | ||
private readonly config; | ||
private readonly _defaultServerUrl?; | ||
private _defaultServerUrl?; | ||
private _defaultServerUrlInitialized; | ||
private _border; | ||
@@ -36,3 +42,3 @@ private _width; | ||
fontFamily: string; | ||
constructor(sanitizer: DomSanitizer, config: InternalMatomoConfiguration, locale?: string); | ||
constructor(sanitizer: DomSanitizer, config: Promise<InternalMatomoConfiguration>, locale?: string); | ||
get serverUrl(): SafeResourceUrl | undefined; | ||
@@ -39,0 +45,0 @@ /** |
export * from './private-api'; | ||
export { NgxMatomoModule, NgxMatomoTrackerModule, MATOMO_DIRECTIVES } from './ngx-matomo.module'; | ||
export { NgxMatomoModule, NgxMatomoTrackerModule, MatomoModule, MATOMO_DIRECTIVES, } from './matomo.module'; | ||
export { provideMatomo, withScriptFactory, MatomoFeatureKind, MatomoFeature } from './providers'; | ||
export { MatomoTracker, MatomoECommerceItem, MatomoECommerceView, MatomoECommerceItemView, MatomoECommerceCategoryView, PagePerformanceTimings, } from './tracker/matomo-tracker.service'; | ||
export { MatomoTracker, MatomoECommerceItem, MatomoECommerceView, MatomoECommerceItemView, MatomoECommerceCategoryView, PagePerformanceTimings, MatomoInstance, } from './tracker/matomo-tracker.service'; | ||
export { MatomoInitializerService } from './tracker/matomo-initializer.service'; | ||
@@ -6,0 +6,0 @@ export { MatomoConfiguration, MATOMO_CONFIGURATION, AutoMatomoConfiguration, MatomoInitializationMode, MatomoConsentMode, InternalMatomoConfiguration, INTERNAL_MATOMO_CONFIGURATION, } from './tracker/configuration'; |
@@ -12,2 +12,12 @@ import { InjectionToken } from '@angular/core'; | ||
/** | ||
* For internal use only. Injection token for deferred {@link InternalMatomoConfiguration}. | ||
* | ||
*/ | ||
export declare const DEFERRED_INTERNAL_MATOMO_CONFIGURATION: InjectionToken<DeferredInternalMatomoConfiguration>; | ||
/** | ||
* For internal use only. Injection token for fully loaded async {@link InternalMatomoConfiguration}. | ||
* | ||
*/ | ||
export declare const ASYNC_INTERNAL_MATOMO_CONFIGURATION: InjectionToken<Promise<InternalMatomoConfiguration>>; | ||
/** | ||
* For internal use only. Module configuration merged with default values. | ||
@@ -17,2 +27,6 @@ * | ||
export declare type InternalMatomoConfiguration = MatomoConfiguration & Required<BaseMatomoConfiguration>; | ||
export interface DeferredInternalMatomoConfiguration { | ||
readonly configuration: Promise<InternalMatomoConfiguration>; | ||
markReady(configuration: AutoMatomoConfiguration<MatomoInitializationMode.AUTO | MatomoInitializationMode.AUTO_DEFERRED>): void; | ||
} | ||
export declare enum MatomoInitializationMode { | ||
@@ -19,0 +33,0 @@ /** Automatically inject matomo script using provided configuration */ |
@@ -10,2 +10,3 @@ import { AutoMatomoConfiguration, MatomoInitializationMode } from './configuration'; | ||
private readonly config; | ||
private readonly deferredConfig; | ||
private readonly tracker; | ||
@@ -12,0 +13,0 @@ private readonly scriptFactory; |
@@ -41,2 +41,3 @@ import { NgZone } from '@angular/core'; | ||
getUserId(): string; | ||
getPageViewId(): string; | ||
getCustomVariable(index: number, scope: string): string; | ||
@@ -460,2 +461,14 @@ getCustomDimension(customDimensionId: number): string; | ||
/** | ||
* Override PageView id for every use of logPageView() <b>THIS SHOULD PROBABLY NOT BE CALLED IN A SINGLE-PAGE APP!</b> | ||
* | ||
* Do not use this if you call trackPageView() multiple times during tracking (e.g. when tracking a single page application) | ||
* | ||
* @param pageView | ||
*/ | ||
setPageViewId(pageView: string): void; | ||
/** | ||
* Returns the PageView id. If not set manually using setPageViewId, this method will return the dynamic PageView id, used in the last tracked page view, or undefined if no page view was tracked yet | ||
*/ | ||
getPageViewId(): Promise<string>; | ||
/** | ||
* Set a custom variable. | ||
@@ -462,0 +475,0 @@ * |
{ | ||
"name": "ngx-matomo-client", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"author": "Emmanuel Roux (https://github.com/EmmanuelRoux)", | ||
@@ -71,4 +71,12 @@ "description": "Matomo (fka. Piwik) client for Angular applications", | ||
"default": "./fesm2020/ngx-matomo-client-router.mjs" | ||
}, | ||
"./testing": { | ||
"types": "./testing/index.d.ts", | ||
"esm2020": "./esm2020/testing/ngx-matomo-client-testing.mjs", | ||
"es2020": "./fesm2020/ngx-matomo-client-testing.mjs", | ||
"es2015": "./fesm2015/ngx-matomo-client-testing.mjs", | ||
"node": "./fesm2015/ngx-matomo-client-testing.mjs", | ||
"default": "./fesm2020/ngx-matomo-client-testing.mjs" | ||
} | ||
} | ||
} |
@@ -42,9 +42,9 @@ <h1 align="center"> | ||
| Angular | ngx-matomo-client | @ngx-matomo/tracker <br> @ngx-matomo/router | Matomo | | ||
| ------- | ----------------- | ------------------------------------------------------------------------------------------ | ------------- | | ||
| 9 to 12 | | 1.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/1.x/README.md)) | Matomo 3 or 4 | | ||
| 13 | | 2.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/2.x/README.md)) | Matomo 3 or 4 | | ||
| 14 | | 3.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/3.x/README.md)) | Matomo 3 or 4 | | ||
| 15 | 5.x | 4.0.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/4.0.x/README.md)) | Matomo 3 or 4 | | ||
| 16 | 5.x | 4.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/4.x/README.md)) _(deprecated)_ | Matomo 3 or 4 | | ||
| Matomo | Angular | ngx-matomo-client | @ngx-matomo/tracker <br> @ngx-matomo/router | | ||
| --------- | ------- | ----------------- | ------------------------------------------------------------------------------------------ | | ||
| 3 or 4 | 9 to 12 | | 1.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/1.x/README.md)) | | ||
| 3 or 4 | 13 | | 2.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/2.x/README.md)) | | ||
| 3 or 4 | 14 | | 3.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/3.x/README.md)) | | ||
| 3 or 4 | 15 | 5.x | 4.0.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/4.0.x/README.md)) | | ||
| 3, 4 or 5 | 16 | 5.x | 4.x ([docs](https://github.com/EmmanuelRoux/ngx-matomo/blob/4.x/README.md)) _(deprecated)_ | | ||
@@ -79,2 +79,3 @@ [![build](https://github.com/EmmanuelRoux/ngx-matomo/actions/workflows/main.yml/badge.svg)](https://github.com/EmmanuelRoux/ngx-matomo/actions/workflows/main.yml) | ||
* [How to define configuration asynchronously? (HTTP fetch...)](#how-to-define-configuration-asynchronously-http-fetch) | ||
* [How can I test my components which uses `MatomoTracker` or other Matomo features?](#how-can-i-test-my-components-which-uses-matomotracker-or-other-matomo-features) | ||
- [Roadmap](#roadmap) | ||
@@ -189,3 +190,4 @@ - [Contributing](#contributing) | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -211,3 +213,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -306,3 +309,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -331,3 +335,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -409,3 +414,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -436,3 +442,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -817,3 +824,4 @@ | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -833,3 +841,3 @@ | ||
provideMatomo( | ||
{ ... }, // Configuration | ||
{...}, // Configuration | ||
withScriptFactory(myScriptFactory), | ||
@@ -839,3 +847,4 @@ ) | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} | ||
``` | ||
@@ -915,2 +924,8 @@ | ||
### How can I test my components which uses `MatomoTracker` or other Matomo features? | ||
Matomo can be easily mocked and tested by declaring either `provideMatomoTesting()` providers or `MatomoTestingModule` in `TestBed`. | ||
All these symbols can be imported from `ngx-matomo-client/testing`. | ||
## Roadmap | ||
@@ -917,0 +932,0 @@ |
export { withRouter, withRouterInterceptors, withRouteData } from './providers'; | ||
export { NgxMatomoRouterModule } from './ngx-matomo-router.module'; | ||
export { MatomoRouterModule, NgxMatomoRouterModule } from './matomo-router.module'; | ||
export { MatomoRouterConfiguration, MATOMO_ROUTER_CONFIGURATION, ExclusionConfig, MatomoRouterConfigurationWithInterceptors, } from './configuration'; | ||
@@ -4,0 +4,0 @@ export { PageTitleProvider, MATOMO_PAGE_TITLE_PROVIDER } from './page-title-providers'; |
@@ -1,1 +0,1 @@ | ||
export declare const version = "^5.0.4"; | ||
export declare const version = "^5.1.0"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '^5.0.4'; | ||
exports.version = '^5.1.0'; | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1102428
132
11056
935