@binance-chain/analytics
Advanced tools
Comparing version 0.0.15 to 0.0.16
import analytics from 'analytics'; | ||
import onRouteChange from './utils/router'; | ||
export { onRouteChange, analytics }; | ||
export default analytics; |
import analytics from 'analytics'; | ||
import onRouteChange from './utils/router'; | ||
export { onRouteChange, analytics }; | ||
export default analytics; |
{ | ||
"name": "@binance-chain/analytics", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Simple wrapper of analytics Layer", | ||
@@ -20,3 +20,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "fd97fc2e46761bb5c1b79412c0741e399a602ec8" | ||
"gitHead": "a4fda9a29c57e89504b8a5ae98220ca18b3d9f4e" | ||
} |
@@ -30,1 +30,13 @@ ## Analytics | ||
``` | ||
### For SPA | ||
```tsx | ||
import Analytics, { onRouteChange } from '@binance-chain/analytics'; | ||
onRouteChange((newRoutePath) => { | ||
console.log('new route path', newRoutePath); | ||
// trigger page view | ||
analytics.page(); | ||
}); | ||
``` |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3093
7
48
42
0