Skip to content

Commit

Permalink
Merge pull request #5653 from vector-im/t3chguy/analytics_info
Browse files Browse the repository at this point in the history
move piwik whitelists to conf and add piwik config.json info to readme
  • Loading branch information
dbkr committed Jan 12, 2018
2 parents 56300f9 + f7a26dd commit d3811e3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ You can configure the app by copying `config.sample.json` to
anything else since it is used to isolate the privileges of file attachments to this
domain. Default: `usercontent.riot.im`. This needs to contain v1.html from
https://github.com/matrix-org/usercontent/blob/master/v1.html
1. `piwik`: an object containing the following properties:
1. `url`: The URL of the Piwik instance to use for collecting Analytics
1. `whitelistedHSUrls`: a list of HS URLs to not redact from the Analytics
1. `whitelistedISUrls`: a list of IS URLs to not redact from the Analytics
1. `siteId`: The Piwik Site ID to use when sending Analytics to the Piwik server configured above

Running as a Desktop app
========================
Expand Down
2 changes: 2 additions & 0 deletions config.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": {
"url": "https://piwik.riot.im/",
"whitelistedHSUrls": ["https://matrix.org"],
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
"siteId": 1
}
}
5 changes: 5 additions & 0 deletions test/app-tests/joining.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ limitations under the License.

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

import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import Platform from '../../src/vector/platform';

require('skin-sdk');

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

PlatformPeg.set(new Platform());

var mc = (
<MatrixChat config={{}}
makeRegistrationUrl={()=>{throw new Error("unimplemented");}}
Expand Down
5 changes: 5 additions & 0 deletions test/app-tests/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ limitations under the License.

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

import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import Platform from '../../src/vector/platform';

import 'skin-sdk';

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

PlatformPeg.set(new Platform());

var params = parseQs(windowLocation);
matrixChat = ReactDOM.render(
<MatrixChat
Expand Down

0 comments on commit d3811e3

Please sign in to comment.