@cmpsr/analytics
Advanced tools
Comparing version 0.0.28 to 0.1.0
import React, { ReactNode } from 'react'; | ||
import { ISegmentConfig, IGAConfig } from './integrations'; | ||
import { ISegmentConfig, IGAConfig, IGTagConfig } from './integrations'; | ||
export interface IAnalyticsProvider { | ||
segment?: ISegmentConfig; | ||
gtag?: IGTagConfig; | ||
ga?: IGAConfig; | ||
@@ -6,0 +7,0 @@ children: ReactNode; |
@@ -59,2 +59,3 @@ "use strict"; | ||
ga: _integrations.GA, | ||
gtag: _integrations.GTag, | ||
segment: _integrations.Segment | ||
@@ -61,0 +62,0 @@ }; |
export * from './types'; | ||
export * from './ga'; | ||
export * from './gtag'; | ||
export * from './segment'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -30,2 +30,14 @@ "use strict"; | ||
}); | ||
var _gtag = _interopRequireWildcard(require("./gtag/index")); | ||
Object.keys(_gtag).forEach(function(key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _gtag[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function() { | ||
return _gtag[key]; | ||
} | ||
}); | ||
}); | ||
var _segment = _interopRequireWildcard(require("./segment/index")); | ||
@@ -32,0 +44,0 @@ Object.keys(_segment).forEach(function(key) { |
@@ -10,3 +10,3 @@ { | ||
}, | ||
"version": "0.0.28", | ||
"version": "0.1.0", | ||
"author": "Steve Cox <stevejcox@me.com>", | ||
@@ -13,0 +13,0 @@ "license": "MIT", |
@@ -24,4 +24,5 @@ # ANALYTICS | ||
- GA | ||
- GTag | ||
- Segment | ||
- GA (will deprecated july 2023) | ||
@@ -43,2 +44,3 @@ ## Setup | ||
segment?: ISegmentConfig; | ||
gtag?: IGTagConfig; | ||
ga?: IGAConfig; | ||
@@ -51,3 +53,5 @@ } | ||
```typescript | ||
const { track } from 'useAnalytics'; | ||
import useAnalytics from 'useAnalytics'; | ||
const { track } = useAnalytics(); | ||
track('Hello World'); | ||
@@ -54,0 +58,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66762
78
910
60