Skip to content

Commit d3811e3

Browse files
authored
Merge pull request element-hq#5653 from vector-im/t3chguy/analytics_info
move piwik whitelists to conf and add piwik config.json info to readme
2 parents 56300f9 + f7a26dd commit d3811e3

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ You can configure the app by copying `config.sample.json` to
130130
anything else since it is used to isolate the privileges of file attachments to this
131131
domain. Default: `usercontent.riot.im`. This needs to contain v1.html from
132132
https://github.com/matrix-org/usercontent/blob/master/v1.html
133+
1. `piwik`: an object containing the following properties:
134+
1. `url`: The URL of the Piwik instance to use for collecting Analytics
135+
1. `whitelistedHSUrls`: a list of HS URLs to not redact from the Analytics
136+
1. `whitelistedISUrls`: a list of IS URLs to not redact from the Analytics
137+
1. `siteId`: The Piwik Site ID to use when sending Analytics to the Piwik server configured above
133138

134139
Running as a Desktop app
135140
========================

‎config.sample.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"welcomeUserId": "@riot-bot:matrix.org",
2525
"piwik": {
2626
"url": "https://piwik.riot.im/",
27+
"whitelistedHSUrls": ["https://matrix.org"],
28+
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
2729
"siteId": 1
2830
}
2931
}

‎test/app-tests/joining.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ limitations under the License.
1616

1717
/* joining.js: tests for the various paths when joining a room */
1818

19+
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
20+
import Platform from '../../src/vector/platform';
21+
1922
require('skin-sdk');
2023

2124
var jssdk = require('matrix-js-sdk');
@@ -85,6 +88,8 @@ describe('joining a room', function () {
8588
localStorage.setItem("mx_access_token", ACCESS_TOKEN );
8689
localStorage.setItem("mx_user_id", USER_ID);
8790

91+
PlatformPeg.set(new Platform());
92+
8893
var mc = (
8994
<MatrixChat config={{}}
9095
makeRegistrationUrl={()=>{throw new Error("unimplemented");}}

‎test/app-tests/loading.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ limitations under the License.
1616

1717
/* loading.js: test the myriad paths we have for loading the application */
1818

19+
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
20+
import Platform from '../../src/vector/platform';
21+
1922
import 'skin-sdk';
2023

2124
import React from 'react';
@@ -137,6 +140,8 @@ describe('loading:', function () {
137140
default_is_url: DEFAULT_IS_URL,
138141
}, opts.config || {});
139142

143+
PlatformPeg.set(new Platform());
144+
140145
var params = parseQs(windowLocation);
141146
matrixChat = ReactDOM.render(
142147
<MatrixChat

0 commit comments

Comments
 (0)