Added piwik
This commit is contained in:
parent
08824a1e4e
commit
055469055c
5 changed files with 29 additions and 10 deletions
|
|
@ -33,8 +33,10 @@ ddp-rate-limiter@1.0.7
|
||||||
dynamic-import@0.1.1
|
dynamic-import@0.1.1
|
||||||
static-html
|
static-html
|
||||||
alexwine:bootstrap-4
|
alexwine:bootstrap-4
|
||||||
selaias:cookie-consent
|
|
||||||
gadicc:blaze-react-component
|
selaias:cookie-consent # Cookie consent
|
||||||
255kb:meteor-status
|
gadicc:blaze-react-component # Add braze to react
|
||||||
mixmax:smart-disconnect
|
255kb:meteor-status # Connect status
|
||||||
flowkey:raven
|
mixmax:smart-disconnect # Disconnect on lost focus
|
||||||
|
flowkey:raven # js errors
|
||||||
|
davidsichau:piwik # Stats
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ caching-compiler@1.1.9
|
||||||
caching-html-compiler@1.1.2
|
caching-html-compiler@1.1.2
|
||||||
callback-hook@1.0.10
|
callback-hook@1.0.10
|
||||||
check@1.2.5
|
check@1.2.5
|
||||||
|
davidsichau:piwik@0.2.1
|
||||||
ddp@1.3.1
|
ddp@1.3.1
|
||||||
ddp-client@2.1.3
|
ddp-client@2.1.3
|
||||||
ddp-common@1.2.9
|
ddp-common@1.2.9
|
||||||
|
|
|
||||||
8
imports/startup/client/piwik-start.js
Normal file
8
imports/startup/client/piwik-start.js
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
Meteor.startup(function() {
|
||||||
|
return Tracker.autorun(function() {
|
||||||
|
var userId;
|
||||||
|
userId = Meteor.userId();
|
||||||
|
console.log(userId);
|
||||||
|
Meteor.Piwik.setUserInfo(userId);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
|
import { Router, Switch, Route } from 'react-router-dom';
|
||||||
import { Grid, Alert, Button } from 'react-bootstrap';
|
import { Grid, Alert, Button } from 'react-bootstrap';
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { createContainer } from 'meteor/react-meteor-data';
|
import { createContainer } from 'meteor/react-meteor-data';
|
||||||
|
|
@ -33,18 +33,25 @@ import Reconnect from '../../components/Reconnect/Reconnect';
|
||||||
// i18n
|
// i18n
|
||||||
import { I18nextProvider } from 'react-i18next';
|
import { I18nextProvider } from 'react-i18next';
|
||||||
import i18n from '/imports/startup/client/i18n';
|
import i18n from '/imports/startup/client/i18n';
|
||||||
|
import '/imports/startup/client/piwik-start.js';
|
||||||
import ravenLogger from '/imports/startup/client/ravenLogger';
|
import ravenLogger from '/imports/startup/client/ravenLogger';
|
||||||
// https://github.com/gadicc/meteor-blaze-react-component/
|
// https://github.com/gadicc/meteor-blaze-react-component/
|
||||||
import Blaze from 'meteor/gadicc:blaze-react-component';
|
import Blaze from 'meteor/gadicc:blaze-react-component';
|
||||||
|
import createHistory from 'history/createBrowserHistory';
|
||||||
//https://react.i18next.com/components/i18nextprovider.html
|
import { check } from 'meteor/check';
|
||||||
|
|
||||||
|
|
||||||
import './App.scss';
|
import './App.scss';
|
||||||
|
|
||||||
|
const history = createHistory()
|
||||||
|
history.listen((location, action) => {
|
||||||
|
// console.log(location.pathname);
|
||||||
|
Meteor.Piwik.trackPage(location.pathname);
|
||||||
|
});
|
||||||
|
|
||||||
const App = props => (
|
const App = props => (
|
||||||
|
/* https://react.i18next.com/components/i18nextprovider.html */
|
||||||
<I18nextProvider i18n={i18n}>
|
<I18nextProvider i18n={i18n}>
|
||||||
<Router>
|
<Router history={history}>
|
||||||
{!props.loading ? <div className="App">
|
{!props.loading ? <div className="App">
|
||||||
<Navigation {...props} />
|
<Navigation {...props} />
|
||||||
<ReSendEmail {...props} />
|
<ReSendEmail {...props} />
|
||||||
|
|
|
||||||
1
packages/piwik
Submodule
1
packages/piwik
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 3fc794651e241a7fba076330d8032f2f9b2e3d7c
|
||||||
Loading…
Add table
Add a link
Reference in a new issue