You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,80 +38,102 @@ function initialize_telemetry_client() {
37
38
initialize_telemetry_client();
38
39
```
39
40
40
-
You are good to go! The telemetry client will start sending data to the default server.
41
+
**You are good to go! 👍️**
42
+
43
+
The telemetry client will start sending data to your configured api base url.
41
44
42
45
## Configuration
43
46
44
-
All the configuration should be done in the `initialize_telemetry_client()` function.
47
+
### # Activate/Deactivate Telemetry Tracking
45
48
46
-
### # Tracking Report Modify
49
+
You can add a setting in your plugin settings page to allow users to opt-in or opt-out of telemetry tracking. You can use the following methods to change the opt-in/opt-out status.
47
50
48
-
Add plugin information in tracking data
51
+
**⚡️ Opt In :**
49
52
50
53
```php
51
-
TelemetryConfig::report()
52
-
->addPluginData()
53
-
->init();
54
+
Telemetry::report()->trackingOptIn();
54
55
```
55
56
56
-
**Filter Hook to Add Additional Data :**
57
+
**⚡️ Opt Out :**
58
+
59
+
```php
60
+
Telemetry::report()->trackingOptOut();
61
+
```
62
+
63
+
### # Tracking Report Modify
64
+
65
+
**⚡️ Filter Hook to Add Additional Data :**
57
66
58
67
This filter allows adding additional data to track information used by the plugin. You can modify the `additional_data` array to include any custom data needed.
function customize_telemetry_data($telemetry_data)
99
+
{
100
+
// Do your stuffs here
87
101
return $telemetry_data;
88
-
});
102
+
}
89
103
```
90
104
91
-
### # Deactivate Feedback Config
105
+
**⚡️ Add plugin information in tracking data**
92
106
93
-
You can customize the feedback survey by adding questions using `add_filter()`
107
+
```php
108
+
TelemetryConfig::report()
109
+
->addPluginData()
110
+
->init();
111
+
```
112
+
113
+
### # Deactivation Feedback Survey
114
+
115
+
**⚡️ Filter Hook to Add Deactivate Reasons :**
94
116
95
-
-**title** - The title of the question
96
-
-**placeholder** - The input placeholder of the question (optional)
117
+
This filter allows adding additional deactivate reasons to the feedback survey. You can modify the `deactivate_reasons` array to include any custom reasons needed.
0 commit comments