Skip to content

Commit dca3e04

Browse files
author
Tomás López Rodríguez
authored
Update README.md (#39)
1 parent 8febc94 commit dca3e04

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,26 @@ Inside your main `Startup`/`Program`, call `AddGoogleAnalytics`. This will confi
6262
Analytics.TrackEvent("generate_lead", new {currency = "USD", value = 99.99});
6363
```
6464

65+
# How to disable tracking on any page
66+
67+
1.- Inject ITrackingState on blazor component
68+
69+
```
70+
@using Blazor.Analytics.Abstractions
71+
@inject ITrackingState DisableNavigation
72+
```
73+
74+
2.- Disable tracking on initialized
75+
```
76+
protected override void OnInitialized()
77+
{
78+
DisableNavigation.DisableTracking();
79+
}
80+
```
81+
6582
# Changelog
83+
### v3.7.0
84+
- Support for disable tracking on any page
6685
### v3.1.0
6786
- Support for Events
6887
### v3.0.0

0 commit comments

Comments
 (0)