File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,24 @@ successful Angular Router navigation event. Under the hood, it calls tracker met
72
72
By default, page title is grabbed from DOM document title and page url is built from Router url. This is fully
73
73
customizable as described in following subsections.
74
74
75
+ #### Customize page title
76
+
77
+ By default, Matomo's router tracks page view _ right after_ ` NavigationEnd ` event is emitted by Angular router and
78
+ retrieves title from Angular ` Title ` service. Delay is configurable with the ` delay `
79
+ [ configuration property] ( docs/configuration-reference.md#ngxmatomoroutermodule ) .
80
+
81
+ As of Angular 14, and as long as you don't set ` delay ` to ` -1 ` , customizing page title by setting ` title ` property of
82
+ Angular route config is natively supported. See Angular tutorial
83
+ here: [ Setting the page title] ( https://angular.io/guide/router#setting-the-page-title ) .
84
+
85
+ If you still need more customization, you can define a ` MatomoRouterInterceptor `
86
+ calling ` MatomoTracker.setDocumentTitle() ` as detailed in
87
+ the [ dedicated section below] ( #customize-anything-page-title-ecommerce-view ) .
88
+
75
89
#### Customize page url
76
90
77
- You may provide a custom service to return current page url:
91
+ By default, the _ current_ url will be sent to Matomo. You may provide a service
92
+ to return a custom page url:
78
93
79
94
``` typescript
80
95
import { PageUrlProvider , MATOMO_PAGE_URL_PROVIDER } from ' @ngx-matomo/router' ;
You can’t perform that action at this time.
0 commit comments