@capillarytech/cap-ui-utils 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
 
2
2
  // import ReactGA from 'react-ga';
3
3
  import tracker from './tracker'
4
- import log from '../utils/console/log'
4
+ import log from '../../utils/console/log'
5
5
  let trackableEvents = {};
6
6
  let trackingStoppedAt = 0;
7
7
  let windowWasInActive = false;
@@ -13,13 +13,13 @@ let addInactiveTimeToEvents = inActiveInterval => {
13
13
  };
14
14
 
15
15
  const startTimer = (event) => {
16
- log('tracker', 'Started timer for ', event);
16
+ log(`tracker Started timer for ${event}` );
17
17
  trackableEvents[event] = Date.now();
18
18
  }
19
19
  const stopTimer = (event, options) =>{
20
20
  const timeTaken = Date.now() - (trackableEvents[event] || 0);
21
21
  delete trackableEvents[event];
22
- log('tracker', 'stopped timer for ', event, timeTaken, options);
22
+ log(`tracker stopped timer for ${event} ${timeTaken} ${options}` );
23
23
  //Track the event timing
24
24
  const { category , action, label } =options;
25
25
  if (options) {
@@ -1,14 +1,14 @@
1
1
  import ReactGA from 'react-ga';
2
2
 
3
- trackEvent = (options)=> {
3
+ const trackEvent = (options)=> {
4
4
  ReactGA.event(options);
5
5
  }
6
6
 
7
- trackTiming = () => {}
7
+ const trackTiming = () => {}
8
8
 
9
- trackPageView = () => {}
9
+ const trackPageView = () => {}
10
10
 
11
- trackException = (description, fatal = true) => {
11
+ const trackException = (description, fatal = true) => {
12
12
  ReactGA.exception({
13
13
  description,
14
14
  fatal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {