@capillarytech/cap-ui-utils 1.0.5 → 1.0.6
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.
- package/GA/index.js +1 -1
- package/GA/utils/timeTracker.js +3 -3
- package/GA/utils/tracker.js +3 -1
- package/index.js +2 -1
- package/package.json +1 -1
package/GA/index.js
CHANGED
package/GA/utils/timeTracker.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { trackEvent } from 'react-ga';
|
|
2
1
|
|
|
2
|
+
// import ReactGA from 'react-ga';
|
|
3
|
+
import tracker from './tracker'
|
|
3
4
|
let trackableEvents = {};
|
|
4
5
|
let trackingStoppedAt = 0;
|
|
5
6
|
let windowWasInActive = false;
|
|
6
|
-
|
|
7
|
+
const {trackEvent}= tracker;
|
|
7
8
|
let addInactiveTimeToEvents = inActiveInterval => {
|
|
8
9
|
Object.keys(trackableEvents).map(function(key) {
|
|
9
10
|
console.log('tracker', 'adjusted timing for', key);
|
|
@@ -15,7 +16,6 @@ function startTimer(event) {
|
|
|
15
16
|
console.log('tracker', 'Started timer for ', event);
|
|
16
17
|
trackableEvents[event] = Date.now();
|
|
17
18
|
}
|
|
18
|
-
|
|
19
19
|
function stopTimer(event, options) {
|
|
20
20
|
const timeTaken = Date.now() - (trackableEvents[event] || 0);
|
|
21
21
|
delete trackableEvents[event];
|
package/GA/utils/tracker.js
CHANGED
package/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Auth } from './auth';
|
|
1
|
+
export { default as Auth } from './auth';
|
|
2
|
+
export { default as GA } from './GA';
|