-
Notifications
You must be signed in to change notification settings - Fork 2
Tracking
David edited this page Jul 26, 2016
·
3 revisions
Tracking of views is done via Google Analytics using the same token as the public website.
- Traffic is distinguished by hostname.
- Tracking is only loaded if
dev|staging|localhost
are not in the hostname
Tracking views is done by adding a trackView()
call to the JSX file in ui-server/client
that has the component that you want to track:
import { trackView } from '../../common/tracking';
export default class MyView extends React.Component {
componentDidMount() {
trackView('MyView');
}
}
All tracking is prefixed with weaveCloudService
, so this example view would show up as weaveCloudServiceMyView
in GA.
The filter that sorts out the service traffic has to be changed. The source code does not need to be changed.