Skip to content

Commit

Permalink
Fixing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Janusz Jakubiec authored and Janusz Jakubiec committed Apr 27, 2023
1 parent 8a3d97e commit ea7c758
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
12 changes: 9 additions & 3 deletions doc/configuration/Services.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,18 @@ Time delay counted when the service is started after which the first metrics rep

Time delay for a periodic update report to be created and sent.

### `services.service_mongoose_system_metrics.tracking_id`:
### `services.service_mongoose_system_metrics.tracking_id.id`:
* **Syntax:** string
* **Default:** no default.
* **Example:** `tracking_id = "UA-123456789"`
* **Example:** `tracking_id.id = "G-123456789"`

Tracking ID to forward the reported metrics so that they can be viewed in the Google Analytics dashboard.

### `services.service_mongoose_system_metrics.tracking_id.secret`:
* **Syntax:** string
* **Default:** no default.
* **Example:** `tracking_id.secret = "Secret"`

Removing the `services.service_mongoose_system_metrics` entry will result in the service not being started.
Metrics will not be collected and shared.
It will generate a notification that the feature is not being used.
Expand Down Expand Up @@ -135,7 +140,8 @@ The number of seconds after an event must be deleted from the `domain_events` ta
report = true
initial_report = 300_000
periodic_report = 108_000_000
tracking_id = "UA-123456789"
tracking_id.id = "G-123456789"
tracking_id.secret = "Secret"

[services.service_domain_db]
db_pool = "global"
Expand Down
11 changes: 8 additions & 3 deletions doc/operation-and-maintenance/System-Metrics-Privacy-Policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,24 @@ Tracking ID is a property identification code that all collected data is associa
It is determining the destination where the collected data is sent.
To create a new Tracking ID, please follow the steps below:

!!! warning
MongooseIM no longer supports Universal Analytics. To use metrics it is needed to create an instance of Google Analytics 4.

* Go to the `Admin` tab of your user dashboard.
* Create a new account with `+ Create Account`.
* Add new property with `+ Create Property`.
* Within the new property go to `Tracking Info > Tracking Code`.
* Tracking ID can be found in the top left corner of the section and has following format UA-XXXX-Y.
* Within the new property go to `Data Streams > Add stream > Web`.
* After successful creation, the ID can be found in the top right corner of the section and has the following format G-XXXX and is named `Measurement ID`.
* To create an API secret, in a `Data Stream` view go to `Event > Measurement Protocol API secrets` and use the `Create` button in the top right corner to create a new secret.

### Example configuration
New Tracking ID can be added to the list of options
```toml
[services.service_mongoose_system_metrics]
initial_report = 300_000
periodic_report = 10_800_000
tracking_id = "UA-XXXX-Y"
tracking_id.id = "G-XXXX"
tracking_id.secret = "Secret"
```

For more details regarding service configuration, please see [Services](../configuration/Services.md) section.
Expand Down
2 changes: 1 addition & 1 deletion test/common/config_parser_helper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ options("miscellaneous") ->
periodic_report => 300000,
report => true,
tracking_id => #{
id => "UA-12345678",
id => "G-12345678",
secret => "Secret"
}}}},
{{s2s, <<"anonymous.localhost">>}, default_s2s()},
Expand Down
4 changes: 2 additions & 2 deletions test/config_parser_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2935,8 +2935,8 @@ service_mongoose_system_metrics(_Config) ->
?cfg(P, default_config(P), T(#{})),
?cfg(P ++ [initial_report], 5000, T(#{<<"initial_report">> => 5000})),
?cfg(P ++ [periodic_report], 5000, T(#{<<"periodic_report">> => 5000})),
?cfg(P ++ [tracking_id], #{id => "UA-12345678", secret => "Secret"},
T(#{<<"tracking_id">> => #{<<"id">> => <<"UA-12345678">>, <<"secret">> => <<"Secret">>}})),
?cfg(P ++ [tracking_id], #{id => "G-12345678", secret => "Secret"},
T(#{<<"tracking_id">> => #{<<"id">> => <<"G-12345678">>, <<"secret">> => <<"Secret">>}})),
?cfg(P ++ [report], true, T(#{<<"report">> => true})),
?err(T(#{<<"initial_report">> => <<"forever">>})),
?err(T(#{<<"periodic_report">> => <<"forever">>})),
Expand Down
2 changes: 1 addition & 1 deletion test/config_parser_SUITE_data/miscellaneous.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@
report = true
initial_report = 20_000
periodic_report = 300_000
tracking_id.id = "UA-12345678"
tracking_id.id = "G-12345678"
tracking_id.secret = "Secret"

0 comments on commit ea7c758

Please sign in to comment.