angulartics2 10.1.0 → 12.1.0
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/LICENSE +1 -1
- package/README.md +7 -8
- package/angular-router.d.ts +3 -0
- package/angulartics2-core.d.ts +3 -0
- package/angulartics2.d.ts +1 -0
- package/angulartics2.module.d.ts +5 -0
- package/angulartics2On.d.ts +6 -0
- package/esm2020/angular-router.mjs +33 -0
- package/esm2020/angulartics2-config.mjs +19 -0
- package/esm2020/angulartics2-core.mjs +93 -0
- package/esm2020/angulartics2-interfaces.mjs +2 -0
- package/esm2020/angulartics2-token.mjs +3 -0
- package/esm2020/angulartics2.mjs +5 -0
- package/{esm2015/angulartics2.module.js → esm2020/angulartics2.module.mjs} +12 -7
- package/esm2020/angulartics2On.mjs +66 -0
- package/esm2020/providers/adobeanalytics/adobeanalytics.mjs +98 -0
- package/esm2020/providers/amplitude/amplitude.mjs +68 -0
- package/esm2020/providers/appinsights/appinsights.mjs +118 -0
- package/esm2020/providers/baidu/baidu.mjs +81 -0
- package/{clicky/esm2015/clicky.interfaces.js → esm2020/providers/clicky/clicky.interfaces.mjs} +1 -0
- package/esm2020/providers/clicky/clicky.mjs +64 -0
- package/esm2020/providers/facebook/facebook.mjs +45 -0
- package/esm2020/providers/ga/ga.mjs +219 -0
- package/{ga-enhanced-ecom/esm2015/ga-enhanced-ecom-options.js → esm2020/providers/ga-enhanced-ecom/ga-enhanced-ecom-options.mjs} +1 -0
- package/esm2020/providers/ga-enhanced-ecom/ga-enhanced-ecom.mjs +32 -0
- package/esm2020/providers/gosquared/gosquared.mjs +55 -0
- package/{gst/esm2015/gst-interfaces.js → esm2020/providers/gst/gst-interfaces.mjs} +1 -0
- package/esm2020/providers/gst/gst.mjs +197 -0
- package/esm2020/providers/gtm/gtm.mjs +114 -0
- package/esm2020/providers/hubspot/hubspot.mjs +40 -0
- package/esm2020/providers/ibm-digital-analytics/ibm-digital-analytics.mjs +125 -0
- package/esm2020/providers/intercom/intercom.mjs +60 -0
- package/esm2020/providers/kissmetrics/kissmetrics.mjs +40 -0
- package/esm2020/providers/launch/launch.mjs +59 -0
- package/esm2020/providers/matomo/matomo.mjs +303 -0
- package/esm2020/providers/mixpanel/mixpanel.mjs +109 -0
- package/esm2020/providers/pyze/pyze.mjs +65 -0
- package/esm2020/providers/segment/segment.mjs +100 -0
- package/esm2020/providers/splunk/splunk.mjs +46 -0
- package/esm2020/providers/woopra/woopra.mjs +61 -0
- package/esm2020/public_api.mjs +32 -0
- package/esm2020/routerless.mjs +10 -0
- package/esm2020/routerless.module.mjs +28 -0
- package/fesm2015/angulartics2.mjs +2248 -0
- package/fesm2015/angulartics2.mjs.map +1 -0
- package/fesm2020/angulartics2.mjs +2294 -0
- package/fesm2020/angulartics2.mjs.map +1 -0
- package/package.json +26 -13
- package/{adobeanalytics → providers/adobeanalytics}/README.md +1 -1
- package/{adobeanalytics → providers/adobeanalytics}/adobeanalytics.d.ts +4 -1
- package/{amplitude → providers/amplitude}/README.md +1 -1
- package/{amplitude → providers/amplitude}/amplitude.d.ts +4 -1
- package/{appinsights → providers/appinsights}/README.md +1 -1
- package/{appinsights → providers/appinsights}/appinsights.d.ts +5 -1
- package/{baidu → providers/baidu}/README.md +1 -1
- package/{baidu → providers/baidu}/baidu.d.ts +4 -1
- package/{clicky → providers/clicky}/README.md +1 -1
- package/{clicky → providers/clicky}/clicky.d.ts +4 -1
- package/{clicky → providers/clicky}/clicky.interfaces.d.ts +0 -0
- package/{facebook → providers/facebook}/README.md +1 -1
- package/{facebook → providers/facebook}/facebook.d.ts +4 -1
- package/{ga → providers/ga}/README.md +1 -1
- package/{ga → providers/ga}/ga.d.ts +6 -1
- package/{ga-enhanced-ecom → providers/ga-enhanced-ecom}/README.md +1 -1
- package/{ga-enhanced-ecom → providers/ga-enhanced-ecom}/ga-enhanced-ecom-options.d.ts +0 -0
- package/{ga-enhanced-ecom → providers/ga-enhanced-ecom}/ga-enhanced-ecom.d.ts +3 -0
- package/{gosquared → providers/gosquared}/README.md +1 -1
- package/{gosquared → providers/gosquared}/gosquared.d.ts +4 -1
- package/{gst → providers/gst}/README.md +2 -2
- package/{gst → providers/gst}/gst-interfaces.d.ts +0 -0
- package/{gst → providers/gst}/gst.d.ts +5 -1
- package/{gtm → providers/gtm}/README.md +2 -2
- package/{gtm → providers/gtm}/gtm.d.ts +5 -1
- package/{hubspot → providers/hubspot}/README.md +1 -1
- package/{hubspot → providers/hubspot}/hubspot.d.ts +4 -1
- package/{ibm-digital-analytics → providers/ibm-digital-analytics}/README.md +2 -2
- package/{ibm-digital-analytics → providers/ibm-digital-analytics}/ibm-digital-analytics.d.ts +4 -1
- package/{intercom → providers/intercom}/README.md +1 -1
- package/{intercom → providers/intercom}/intercom.d.ts +4 -1
- package/{kissmetrics → providers/kissmetrics}/README.md +1 -1
- package/{kissmetrics → providers/kissmetrics}/kissmetrics.d.ts +4 -1
- package/{launch → providers/launch}/README.md +3 -3
- package/{launch → providers/launch}/launch.d.ts +4 -1
- package/{matomo → providers/matomo}/README.md +3 -3
- package/{matomo → providers/matomo}/matomo.d.ts +9 -6
- package/{mixpanel → providers/mixpanel}/README.md +2 -2
- package/{mixpanel → providers/mixpanel}/mixpanel.d.ts +4 -1
- package/{pyze → providers/pyze}/README.md +1 -1
- package/providers/pyze/pyze.d.ts +13 -0
- package/{segment → providers/segment}/README.md +3 -3
- package/{segment → providers/segment}/segment.d.ts +4 -1
- package/{splunk → providers/splunk}/README.md +2 -2
- package/providers/splunk/splunk.d.ts +11 -0
- package/{woopra → providers/woopra}/README.md +1 -1
- package/{woopra → providers/woopra}/woopra.d.ts +4 -1
- package/public_api.d.ts +23 -0
- package/routerless.module.d.ts +10 -0
- package/adobeanalytics/angulartics2-adobeanalytics.d.ts +0 -4
- package/adobeanalytics/angulartics2-adobeanalytics.metadata.json +0 -1
- package/adobeanalytics/bundles/angulartics2-adobeanalytics.umd.js +0 -116
- package/adobeanalytics/bundles/angulartics2-adobeanalytics.umd.js.map +0 -1
- package/adobeanalytics/bundles/angulartics2-adobeanalytics.umd.min.js +0 -2
- package/adobeanalytics/bundles/angulartics2-adobeanalytics.umd.min.js.map +0 -1
- package/adobeanalytics/esm2015/adobeanalytics.js +0 -103
- package/adobeanalytics/esm2015/angulartics2-adobeanalytics.js +0 -5
- package/adobeanalytics/fesm2015/angulartics2-adobeanalytics.js +0 -107
- package/adobeanalytics/fesm2015/angulartics2-adobeanalytics.js.map +0 -1
- package/adobeanalytics/package.json +0 -20
- package/amplitude/angulartics2-amplitude.d.ts +0 -4
- package/amplitude/angulartics2-amplitude.metadata.json +0 -1
- package/amplitude/bundles/angulartics2-amplitude.umd.js +0 -88
- package/amplitude/bundles/angulartics2-amplitude.umd.js.map +0 -1
- package/amplitude/bundles/angulartics2-amplitude.umd.min.js +0 -2
- package/amplitude/bundles/angulartics2-amplitude.umd.min.js.map +0 -1
- package/amplitude/esm2015/amplitude.js +0 -73
- package/amplitude/esm2015/angulartics2-amplitude.js +0 -5
- package/amplitude/fesm2015/angulartics2-amplitude.js +0 -78
- package/amplitude/fesm2015/angulartics2-amplitude.js.map +0 -1
- package/amplitude/package.json +0 -20
- package/angulartics2.metadata.json +0 -1
- package/appinsights/angulartics2-appinsights.d.ts +0 -4
- package/appinsights/angulartics2-appinsights.metadata.json +0 -1
- package/appinsights/bundles/angulartics2-appinsights.umd.js +0 -134
- package/appinsights/bundles/angulartics2-appinsights.umd.js.map +0 -1
- package/appinsights/bundles/angulartics2-appinsights.umd.min.js +0 -2
- package/appinsights/bundles/angulartics2-appinsights.umd.min.js.map +0 -1
- package/appinsights/esm2015/angulartics2-appinsights.js +0 -5
- package/appinsights/esm2015/appinsights.js +0 -122
- package/appinsights/fesm2015/angulartics2-appinsights.js +0 -125
- package/appinsights/fesm2015/angulartics2-appinsights.js.map +0 -1
- package/appinsights/package.json +0 -20
- package/baidu/angulartics2-baidu.d.ts +0 -4
- package/baidu/angulartics2-baidu.metadata.json +0 -1
- package/baidu/bundles/angulartics2-baidu.umd.js +0 -98
- package/baidu/bundles/angulartics2-baidu.umd.js.map +0 -1
- package/baidu/bundles/angulartics2-baidu.umd.min.js +0 -2
- package/baidu/bundles/angulartics2-baidu.umd.min.js.map +0 -1
- package/baidu/esm2015/angulartics2-baidu.js +0 -5
- package/baidu/esm2015/baidu.js +0 -83
- package/baidu/fesm2015/angulartics2-baidu.js +0 -88
- package/baidu/fesm2015/angulartics2-baidu.js.map +0 -1
- package/baidu/package.json +0 -20
- package/bundles/angulartics2.umd.js +0 -564
- package/bundles/angulartics2.umd.js.map +0 -1
- package/bundles/angulartics2.umd.min.js +0 -16
- package/bundles/angulartics2.umd.min.js.map +0 -1
- package/clicky/angulartics2-clicky.d.ts +0 -4
- package/clicky/angulartics2-clicky.metadata.json +0 -1
- package/clicky/bundles/angulartics2-clicky.umd.js +0 -80
- package/clicky/bundles/angulartics2-clicky.umd.js.map +0 -1
- package/clicky/bundles/angulartics2-clicky.umd.min.js +0 -2
- package/clicky/bundles/angulartics2-clicky.umd.min.js.map +0 -1
- package/clicky/esm2015/angulartics2-clicky.js +0 -5
- package/clicky/esm2015/clicky.js +0 -68
- package/clicky/fesm2015/angulartics2-clicky.js +0 -72
- package/clicky/fesm2015/angulartics2-clicky.js.map +0 -1
- package/clicky/package.json +0 -20
- package/esm2015/angular-router.js +0 -36
- package/esm2015/angulartics2-config.js +0 -19
- package/esm2015/angulartics2-core.js +0 -89
- package/esm2015/angulartics2-interfaces.js +0 -1
- package/esm2015/angulartics2-token.js +0 -3
- package/esm2015/angulartics2.js +0 -5
- package/esm2015/angulartics2On.js +0 -55
- package/esm2015/public_api.js +0 -9
- package/esm2015/routerless.js +0 -10
- package/facebook/angulartics2-facebook.d.ts +0 -4
- package/facebook/angulartics2-facebook.metadata.json +0 -1
- package/facebook/bundles/angulartics2-facebook.umd.js +0 -62
- package/facebook/bundles/angulartics2-facebook.umd.js.map +0 -1
- package/facebook/bundles/angulartics2-facebook.umd.min.js +0 -2
- package/facebook/bundles/angulartics2-facebook.umd.min.js.map +0 -1
- package/facebook/esm2015/angulartics2-facebook.js +0 -5
- package/facebook/esm2015/facebook.js +0 -47
- package/facebook/fesm2015/angulartics2-facebook.js +0 -52
- package/facebook/fesm2015/angulartics2-facebook.js.map +0 -1
- package/facebook/package.json +0 -20
- package/fesm2015/angulartics2.js +0 -223
- package/fesm2015/angulartics2.js.map +0 -1
- package/ga/angulartics2-ga.d.ts +0 -4
- package/ga/angulartics2-ga.metadata.json +0 -1
- package/ga/bundles/angulartics2-ga.umd.js +0 -600
- package/ga/bundles/angulartics2-ga.umd.js.map +0 -1
- package/ga/bundles/angulartics2-ga.umd.min.js +0 -16
- package/ga/bundles/angulartics2-ga.umd.min.js.map +0 -1
- package/ga/esm2015/angulartics2-ga.js +0 -5
- package/ga/esm2015/ga.js +0 -207
- package/ga/fesm2015/angulartics2-ga.js +0 -212
- package/ga/fesm2015/angulartics2-ga.js.map +0 -1
- package/ga/package.json +0 -20
- package/ga-enhanced-ecom/angulartics2-ga-enhanced-ecom.d.ts +0 -4
- package/ga-enhanced-ecom/angulartics2-ga-enhanced-ecom.metadata.json +0 -1
- package/ga-enhanced-ecom/bundles/angulartics2-ga-enhanced-ecom.umd.js +0 -47
- package/ga-enhanced-ecom/bundles/angulartics2-ga-enhanced-ecom.umd.js.map +0 -1
- package/ga-enhanced-ecom/bundles/angulartics2-ga-enhanced-ecom.umd.min.js +0 -2
- package/ga-enhanced-ecom/bundles/angulartics2-ga-enhanced-ecom.umd.min.js.map +0 -1
- package/ga-enhanced-ecom/esm2015/angulartics2-ga-enhanced-ecom.js +0 -5
- package/ga-enhanced-ecom/esm2015/ga-enhanced-ecom.js +0 -30
- package/ga-enhanced-ecom/fesm2015/angulartics2-ga-enhanced-ecom.js +0 -36
- package/ga-enhanced-ecom/fesm2015/angulartics2-ga-enhanced-ecom.js.map +0 -1
- package/ga-enhanced-ecom/package.json +0 -20
- package/gosquared/angulartics2-gosquared.d.ts +0 -4
- package/gosquared/angulartics2-gosquared.metadata.json +0 -1
- package/gosquared/bundles/angulartics2-gosquared.umd.js +0 -72
- package/gosquared/bundles/angulartics2-gosquared.umd.js.map +0 -1
- package/gosquared/bundles/angulartics2-gosquared.umd.min.js +0 -2
- package/gosquared/bundles/angulartics2-gosquared.umd.min.js.map +0 -1
- package/gosquared/esm2015/angulartics2-gosquared.js +0 -5
- package/gosquared/esm2015/gosquared.js +0 -57
- package/gosquared/fesm2015/angulartics2-gosquared.js +0 -62
- package/gosquared/fesm2015/angulartics2-gosquared.js.map +0 -1
- package/gosquared/package.json +0 -20
- package/gst/angulartics2-gst.d.ts +0 -4
- package/gst/angulartics2-gst.metadata.json +0 -1
- package/gst/bundles/angulartics2-gst.umd.js +0 -514
- package/gst/bundles/angulartics2-gst.umd.js.map +0 -1
- package/gst/bundles/angulartics2-gst.umd.min.js +0 -16
- package/gst/bundles/angulartics2-gst.umd.min.js.map +0 -1
- package/gst/esm2015/angulartics2-gst.js +0 -5
- package/gst/esm2015/gst.js +0 -182
- package/gst/fesm2015/angulartics2-gst.js +0 -187
- package/gst/fesm2015/angulartics2-gst.js.map +0 -1
- package/gst/package.json +0 -20
- package/gtm/angulartics2-gtm.d.ts +0 -4
- package/gtm/angulartics2-gtm.metadata.json +0 -1
- package/gtm/bundles/angulartics2-gtm.umd.js +0 -125
- package/gtm/bundles/angulartics2-gtm.umd.js.map +0 -1
- package/gtm/bundles/angulartics2-gtm.umd.min.js +0 -2
- package/gtm/bundles/angulartics2-gtm.umd.min.js.map +0 -1
- package/gtm/esm2015/angulartics2-gtm.js +0 -5
- package/gtm/esm2015/gtm.js +0 -108
- package/gtm/fesm2015/angulartics2-gtm.js +0 -113
- package/gtm/fesm2015/angulartics2-gtm.js.map +0 -1
- package/gtm/package.json +0 -20
- package/hubspot/angulartics2-hubspot.d.ts +0 -4
- package/hubspot/angulartics2-hubspot.metadata.json +0 -1
- package/hubspot/bundles/angulartics2-hubspot.umd.js +0 -58
- package/hubspot/bundles/angulartics2-hubspot.umd.js.map +0 -1
- package/hubspot/bundles/angulartics2-hubspot.umd.min.js +0 -2
- package/hubspot/bundles/angulartics2-hubspot.umd.min.js.map +0 -1
- package/hubspot/esm2015/angulartics2-hubspot.js +0 -5
- package/hubspot/esm2015/hubspot.js +0 -43
- package/hubspot/fesm2015/angulartics2-hubspot.js +0 -48
- package/hubspot/fesm2015/angulartics2-hubspot.js.map +0 -1
- package/hubspot/package.json +0 -20
- package/ibm-digital-analytics/angulartics2-ibm-digital-analytics.d.ts +0 -4
- package/ibm-digital-analytics/angulartics2-ibm-digital-analytics.metadata.json +0 -1
- package/ibm-digital-analytics/bundles/angulartics2-ibm-digital-analytics.umd.js +0 -142
- package/ibm-digital-analytics/bundles/angulartics2-ibm-digital-analytics.umd.js.map +0 -1
- package/ibm-digital-analytics/bundles/angulartics2-ibm-digital-analytics.umd.min.js +0 -2
- package/ibm-digital-analytics/bundles/angulartics2-ibm-digital-analytics.umd.min.js.map +0 -1
- package/ibm-digital-analytics/esm2015/angulartics2-ibm-digital-analytics.js +0 -5
- package/ibm-digital-analytics/esm2015/ibm-digital-analytics.js +0 -127
- package/ibm-digital-analytics/fesm2015/angulartics2-ibm-digital-analytics.js +0 -132
- package/ibm-digital-analytics/fesm2015/angulartics2-ibm-digital-analytics.js.map +0 -1
- package/ibm-digital-analytics/package.json +0 -20
- package/intercom/angulartics2-intercom.d.ts +0 -4
- package/intercom/angulartics2-intercom.metadata.json +0 -1
- package/intercom/bundles/angulartics2-intercom.umd.js +0 -79
- package/intercom/bundles/angulartics2-intercom.umd.js.map +0 -1
- package/intercom/bundles/angulartics2-intercom.umd.min.js +0 -2
- package/intercom/bundles/angulartics2-intercom.umd.min.js.map +0 -1
- package/intercom/esm2015/angulartics2-intercom.js +0 -5
- package/intercom/esm2015/intercom.js +0 -64
- package/intercom/fesm2015/angulartics2-intercom.js +0 -69
- package/intercom/fesm2015/angulartics2-intercom.js.map +0 -1
- package/intercom/package.json +0 -20
- package/kissmetrics/angulartics2-kissmetrics.d.ts +0 -4
- package/kissmetrics/angulartics2-kissmetrics.metadata.json +0 -1
- package/kissmetrics/bundles/angulartics2-kissmetrics.umd.js +0 -59
- package/kissmetrics/bundles/angulartics2-kissmetrics.umd.js.map +0 -1
- package/kissmetrics/bundles/angulartics2-kissmetrics.umd.min.js +0 -2
- package/kissmetrics/bundles/angulartics2-kissmetrics.umd.min.js.map +0 -1
- package/kissmetrics/esm2015/angulartics2-kissmetrics.js +0 -5
- package/kissmetrics/esm2015/kissmetrics.js +0 -44
- package/kissmetrics/fesm2015/angulartics2-kissmetrics.js +0 -49
- package/kissmetrics/fesm2015/angulartics2-kissmetrics.js.map +0 -1
- package/kissmetrics/package.json +0 -23
- package/launch/angulartics2-launch.d.ts +0 -4
- package/launch/angulartics2-launch.metadata.json +0 -1
- package/launch/bundles/angulartics2-launch.umd.js +0 -78
- package/launch/bundles/angulartics2-launch.umd.js.map +0 -1
- package/launch/bundles/angulartics2-launch.umd.min.js +0 -2
- package/launch/bundles/angulartics2-launch.umd.min.js.map +0 -1
- package/launch/esm2015/angulartics2-launch.js +0 -5
- package/launch/esm2015/launch.js +0 -63
- package/launch/fesm2015/angulartics2-launch.js +0 -68
- package/launch/fesm2015/angulartics2-launch.js.map +0 -1
- package/launch/package.json +0 -20
- package/matomo/angulartics2-matomo.d.ts +0 -4
- package/matomo/angulartics2-matomo.metadata.json +0 -1
- package/matomo/bundles/angulartics2-matomo.umd.js +0 -309
- package/matomo/bundles/angulartics2-matomo.umd.js.map +0 -1
- package/matomo/bundles/angulartics2-matomo.umd.min.js +0 -2
- package/matomo/bundles/angulartics2-matomo.umd.min.js.map +0 -1
- package/matomo/esm2015/angulartics2-matomo.js +0 -5
- package/matomo/esm2015/matomo.js +0 -294
- package/matomo/fesm2015/angulartics2-matomo.js +0 -299
- package/matomo/fesm2015/angulartics2-matomo.js.map +0 -1
- package/matomo/package.json +0 -20
- package/mixpanel/angulartics2-mixpanel.d.ts +0 -4
- package/mixpanel/angulartics2-mixpanel.metadata.json +0 -1
- package/mixpanel/bundles/angulartics2-mixpanel.umd.js +0 -132
- package/mixpanel/bundles/angulartics2-mixpanel.umd.js.map +0 -1
- package/mixpanel/bundles/angulartics2-mixpanel.umd.min.js +0 -2
- package/mixpanel/bundles/angulartics2-mixpanel.umd.min.js.map +0 -1
- package/mixpanel/esm2015/angulartics2-mixpanel.js +0 -5
- package/mixpanel/esm2015/mixpanel.js +0 -117
- package/mixpanel/fesm2015/angulartics2-mixpanel.js +0 -122
- package/mixpanel/fesm2015/angulartics2-mixpanel.js.map +0 -1
- package/mixpanel/package.json +0 -20
- package/pyze/angulartics2-pyze.d.ts +0 -4
- package/pyze/angulartics2-pyze.metadata.json +0 -1
- package/pyze/bundles/angulartics2-pyze.umd.js +0 -82
- package/pyze/bundles/angulartics2-pyze.umd.js.map +0 -1
- package/pyze/bundles/angulartics2-pyze.umd.min.js +0 -2
- package/pyze/bundles/angulartics2-pyze.umd.min.js.map +0 -1
- package/pyze/esm2015/angulartics2-pyze.js +0 -5
- package/pyze/esm2015/pyze.js +0 -67
- package/pyze/fesm2015/angulartics2-pyze.js +0 -72
- package/pyze/fesm2015/angulartics2-pyze.js.map +0 -1
- package/pyze/package.json +0 -20
- package/pyze/pyze.d.ts +0 -10
- package/routerlessmodule/angulartics2-routerlessmodule.d.ts +0 -4
- package/routerlessmodule/angulartics2-routerlessmodule.metadata.json +0 -1
- package/routerlessmodule/bundles/angulartics2-routerlessmodule.umd.js +0 -38
- package/routerlessmodule/bundles/angulartics2-routerlessmodule.umd.js.map +0 -1
- package/routerlessmodule/bundles/angulartics2-routerlessmodule.umd.min.js +0 -2
- package/routerlessmodule/bundles/angulartics2-routerlessmodule.umd.min.js.map +0 -1
- package/routerlessmodule/esm2015/angulartics2-routerlessmodule.js +0 -5
- package/routerlessmodule/esm2015/routerless.module.js +0 -20
- package/routerlessmodule/fesm2015/angulartics2-routerlessmodule.js +0 -27
- package/routerlessmodule/fesm2015/angulartics2-routerlessmodule.js.map +0 -1
- package/routerlessmodule/package.json +0 -20
- package/routerlessmodule/routerless.module.d.ts +0 -5
- package/segment/angulartics2-segment.d.ts +0 -4
- package/segment/angulartics2-segment.metadata.json +0 -1
- package/segment/bundles/angulartics2-segment.umd.js +0 -120
- package/segment/bundles/angulartics2-segment.umd.js.map +0 -1
- package/segment/bundles/angulartics2-segment.umd.min.js +0 -2
- package/segment/bundles/angulartics2-segment.umd.min.js.map +0 -1
- package/segment/esm2015/angulartics2-segment.js +0 -5
- package/segment/esm2015/segment.js +0 -105
- package/segment/fesm2015/angulartics2-segment.js +0 -110
- package/segment/fesm2015/angulartics2-segment.js.map +0 -1
- package/segment/package.json +0 -20
- package/splunk/angulartics2-splunk.d.ts +0 -4
- package/splunk/angulartics2-splunk.metadata.json +0 -1
- package/splunk/bundles/angulartics2-splunk.umd.js +0 -62
- package/splunk/bundles/angulartics2-splunk.umd.js.map +0 -1
- package/splunk/bundles/angulartics2-splunk.umd.min.js +0 -2
- package/splunk/bundles/angulartics2-splunk.umd.min.js.map +0 -1
- package/splunk/esm2015/angulartics2-splunk.js +0 -5
- package/splunk/esm2015/splunk.js +0 -48
- package/splunk/fesm2015/angulartics2-splunk.js +0 -53
- package/splunk/fesm2015/angulartics2-splunk.js.map +0 -1
- package/splunk/package.json +0 -20
- package/splunk/splunk.d.ts +0 -8
- package/uiroutermodule/angulartics2-uiroutermodule.d.ts +0 -4
- package/uiroutermodule/angulartics2-uiroutermodule.metadata.json +0 -1
- package/uiroutermodule/bundles/angulartics2-uiroutermodule.umd.js +0 -76
- package/uiroutermodule/bundles/angulartics2-uiroutermodule.umd.js.map +0 -1
- package/uiroutermodule/bundles/angulartics2-uiroutermodule.umd.min.js +0 -2
- package/uiroutermodule/bundles/angulartics2-uiroutermodule.umd.min.js.map +0 -1
- package/uiroutermodule/esm2015/angulartics2-uiroutermodule.js +0 -5
- package/uiroutermodule/esm2015/public_api.js +0 -3
- package/uiroutermodule/esm2015/uirouter.js +0 -40
- package/uiroutermodule/esm2015/uirouter.module.js +0 -21
- package/uiroutermodule/fesm2015/angulartics2-uiroutermodule.js +0 -64
- package/uiroutermodule/fesm2015/angulartics2-uiroutermodule.js.map +0 -1
- package/uiroutermodule/package.json +0 -20
- package/uiroutermodule/public_api.d.ts +0 -2
- package/uiroutermodule/uirouter.d.ts +0 -17
- package/uiroutermodule/uirouter.module.d.ts +0 -5
- package/woopra/angulartics2-woopra.d.ts +0 -4
- package/woopra/angulartics2-woopra.metadata.json +0 -1
- package/woopra/bundles/angulartics2-woopra.umd.js +0 -79
- package/woopra/bundles/angulartics2-woopra.umd.js.map +0 -1
- package/woopra/bundles/angulartics2-woopra.umd.min.js +0 -2
- package/woopra/bundles/angulartics2-woopra.umd.min.js.map +0 -1
- package/woopra/esm2015/angulartics2-woopra.js +0 -5
- package/woopra/esm2015/woopra.js +0 -64
- package/woopra/fesm2015/angulartics2-woopra.js +0 -69
- package/woopra/fesm2015/angulartics2-woopra.js.map +0 -1
- package/woopra/package.json +0 -20
package/amplitude/package.json
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "../../../../node_modules/ng-packagr/package.schema.json",
|
3
|
-
"name": "angulartics2/amplitude",
|
4
|
-
"description": "The amplitude module",
|
5
|
-
"homepage": "https://angulartics.github.io/angulartics2/",
|
6
|
-
"author": "João Ribeiro <jonnybgod@gmail.com> (http://github.com/JonnyBGod)",
|
7
|
-
"repository": "angulartics/angulartics2",
|
8
|
-
"license": "MIT",
|
9
|
-
"main": "bundles/angulartics2-amplitude.umd.js",
|
10
|
-
"module": "fesm2015/angulartics2-amplitude.js",
|
11
|
-
"es2015": "fesm2015/angulartics2-amplitude.js",
|
12
|
-
"esm2015": "esm2015/angulartics2-amplitude.js",
|
13
|
-
"fesm2015": "fesm2015/angulartics2-amplitude.js",
|
14
|
-
"typings": "angulartics2-amplitude.d.ts",
|
15
|
-
"metadata": "angulartics2-amplitude.metadata.json",
|
16
|
-
"sideEffects": false,
|
17
|
-
"dependencies": {
|
18
|
-
"tslib": "^2.0.0"
|
19
|
-
}
|
20
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"Angulartics2":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","name":"ANGULARTICS2_TOKEN"}]}]],"parameters":[{"__symbolic":"reference","name":"RouterlessTracking"},{"__symbolic":"reference","name":"Angulartics2Token"}]}],"filterDeveloperMode":[{"__symbolic":"method"}],"trackUrlChange":[{"__symbolic":"method"}],"matchesExcludedRoute":[{"__symbolic":"method"}],"clearUrl":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"Angulartics2Module":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","name":"Angulartics2OnModule"}],"exports":[{"__symbolic":"reference","name":"Angulartics2On"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["settings"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"Angulartics2Module"},"providers":[{"provide":{"__symbolic":"reference","name":"ANGULARTICS2_TOKEN"},"useValue":{"settings":{"__symbolic":"reference","name":"settings"}}},{"provide":{"__symbolic":"reference","name":"RouterlessTracking"},"useClass":{"__symbolic":"reference","name":"AngularRouterTracking"}},{"__symbolic":"reference","name":"Angulartics2"}]}}}},"ANGULARTICS2_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":8,"character":38},"arguments":["ANGULARTICS2"]},"Angulartics2Token":{"__symbolic":"interface"},"EventTrack":{"__symbolic":"interface"},"PageTrack":{"__symbolic":"interface"},"UserTimings":{"__symbolic":"interface"},"Angulartics2On":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":10,"character":1},"arguments":[{"selector":"[angulartics2On]"}]}],"members":{"angulartics2On":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3},"arguments":["angulartics2On"]}]}],"angularticsAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"angularticsCategory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"angularticsLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"angularticsValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"angularticsProperties":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":21,"character":19},{"__symbolic":"reference","name":"Angulartics2"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":23,"character":22}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"eventTrack":[{"__symbolic":"method"}]}},"Angulartics2OnModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":68,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"Angulartics2On"}],"exports":[{"__symbolic":"reference","name":"Angulartics2On"}]}]}],"members":{}},"GoogleAnalyticsSettings":{"__symbolic":"interface"},"AppInsightsSettings":{"__symbolic":"interface"},"GoogleTagManagerSettings":{"__symbolic":"interface"},"GoogleGlobalSiteTagSettings":{"__symbolic":"interface"},"PageTrackingSettings":{"__symbolic":"interface"},"Angulartics2Settings":{"__symbolic":"interface"},"DefaultConfig":{"__symbolic":"class","members":{}},"RouterlessTracking":{"__symbolic":"class","members":{"trackLocation":[{"__symbolic":"method"}],"prepareExternalUrl":[{"__symbolic":"method"}]}},"TrackNavigationEnd":{"__symbolic":"interface"},"AngularRouterTracking":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":18,"character":20},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":19,"character":22}]}],"trackLocation":[{"__symbolic":"method"}],"prepareExternalUrl":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"Angulartics2":"./angulartics2-core","Angulartics2Module":"./angulartics2.module","ANGULARTICS2_TOKEN":"./angulartics2-token","Angulartics2Token":"./angulartics2-token","EventTrack":"./angulartics2-interfaces","PageTrack":"./angulartics2-interfaces","UserTimings":"./angulartics2-interfaces","Angulartics2On":"./angulartics2On","Angulartics2OnModule":"./angulartics2On","GoogleAnalyticsSettings":"./angulartics2-config","AppInsightsSettings":"./angulartics2-config","GoogleTagManagerSettings":"./angulartics2-config","GoogleGlobalSiteTagSettings":"./angulartics2-config","PageTrackingSettings":"./angulartics2-config","Angulartics2Settings":"./angulartics2-config","DefaultConfig":"./angulartics2-config","RouterlessTracking":"./routerless","TrackNavigationEnd":"./routerless","AngularRouterTracking":"./angular-router"},"importAs":"angulartics2"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"AppInsightsDefaults":{"__symbolic":"class","members":{}},"Angulartics2AppInsights":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"angulartics2","name":"Angulartics2","line":28,"character":26},{"__symbolic":"reference","module":"@angular/platform-browser","name":"Title","line":29,"character":19},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":30,"character":20}]}],"startTracking":[{"__symbolic":"method"}],"startTimer":[{"__symbolic":"method"}],"stopTimer":[{"__symbolic":"method"}],"pageTrack":[{"__symbolic":"method"}],"eventTrack":[{"__symbolic":"method"}],"exceptionTrack":[{"__symbolic":"method"}],"setUsername":[{"__symbolic":"method"}],"setUserProperties":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"AppInsightsDefaults":"./appinsights","Angulartics2AppInsights":"./appinsights"},"importAs":"angulartics2/appinsights"}
|
@@ -1,134 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@angular/router'), require('rxjs/operators'), require('angulartics2')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('angulartics2/appinsights', ['exports', '@angular/core', '@angular/platform-browser', '@angular/router', 'rxjs/operators', 'angulartics2'], factory) :
|
4
|
-
(global = global || self, factory((global.angulartics2 = global.angulartics2 || {}, global.angulartics2.appinsights = {}), global.ng.core, global.ng.platformBrowser, global.ng.router, global.rxjs.operators, global.angulartics2));
|
5
|
-
}(this, (function (exports, i0, i2, i3, operators, i1) { 'use strict';
|
6
|
-
|
7
|
-
var AppInsightsDefaults = /** @class */ (function () {
|
8
|
-
function AppInsightsDefaults() {
|
9
|
-
this.userId = null;
|
10
|
-
}
|
11
|
-
return AppInsightsDefaults;
|
12
|
-
}());
|
13
|
-
var Angulartics2AppInsights = /** @class */ (function () {
|
14
|
-
function Angulartics2AppInsights(angulartics2, title, router) {
|
15
|
-
var _this = this;
|
16
|
-
this.angulartics2 = angulartics2;
|
17
|
-
this.title = title;
|
18
|
-
this.router = router;
|
19
|
-
this.loadStartTime = null;
|
20
|
-
this.loadTime = null;
|
21
|
-
this.metrics = null;
|
22
|
-
this.dimensions = null;
|
23
|
-
this.measurements = null;
|
24
|
-
if (typeof appInsights === 'undefined') {
|
25
|
-
console.warn('appInsights not found');
|
26
|
-
}
|
27
|
-
var defaults = new AppInsightsDefaults();
|
28
|
-
// Set the default settings for this module
|
29
|
-
this.angulartics2.settings.appInsights = Object.assign(Object.assign({}, defaults), this.angulartics2.settings.appInsights);
|
30
|
-
this.angulartics2.setUsername
|
31
|
-
.subscribe(function (x) { return _this.setUsername(x); });
|
32
|
-
this.angulartics2.setUserProperties
|
33
|
-
.subscribe(function (x) { return _this.setUserProperties(x); });
|
34
|
-
}
|
35
|
-
Angulartics2AppInsights.prototype.startTracking = function () {
|
36
|
-
var _this = this;
|
37
|
-
this.angulartics2.pageTrack
|
38
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
39
|
-
.subscribe(function (x) { return _this.pageTrack(x.path); });
|
40
|
-
this.angulartics2.eventTrack
|
41
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
42
|
-
.subscribe(function (x) { return _this.eventTrack(x.action, x.properties); });
|
43
|
-
this.angulartics2.exceptionTrack
|
44
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
45
|
-
.subscribe(function (x) { return _this.exceptionTrack(x); });
|
46
|
-
this.router.events
|
47
|
-
.pipe(this.angulartics2.filterDeveloperMode(), operators.filter(function (event) { return event instanceof i3.NavigationStart; }))
|
48
|
-
.subscribe(function (event) { return _this.startTimer(); });
|
49
|
-
this.router.events
|
50
|
-
.pipe(operators.filter(function (event) { return event instanceof i3.NavigationError || event instanceof i3.NavigationEnd; }))
|
51
|
-
.subscribe(function (error) { return _this.stopTimer(); });
|
52
|
-
};
|
53
|
-
Angulartics2AppInsights.prototype.startTimer = function () {
|
54
|
-
this.loadStartTime = Date.now();
|
55
|
-
this.loadTime = null;
|
56
|
-
};
|
57
|
-
Angulartics2AppInsights.prototype.stopTimer = function () {
|
58
|
-
this.loadTime = Date.now() - this.loadStartTime;
|
59
|
-
this.loadStartTime = null;
|
60
|
-
};
|
61
|
-
/**
|
62
|
-
* Page Track in Baidu Analytics
|
63
|
-
*
|
64
|
-
* @param path - Location 'path'
|
65
|
-
*
|
66
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview
|
67
|
-
*/
|
68
|
-
Angulartics2AppInsights.prototype.pageTrack = function (path) {
|
69
|
-
appInsights.trackPageView(this.title.getTitle(), path, this.dimensions, this.metrics, this.loadTime);
|
70
|
-
};
|
71
|
-
/**
|
72
|
-
* Log a user action or other occurrence.
|
73
|
-
*
|
74
|
-
* @param name Name to identify this event in the portal.
|
75
|
-
* @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.
|
76
|
-
*
|
77
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent
|
78
|
-
*/
|
79
|
-
Angulartics2AppInsights.prototype.eventTrack = function (name, properties) {
|
80
|
-
appInsights.trackEvent(name, properties, this.measurements);
|
81
|
-
};
|
82
|
-
/**
|
83
|
-
* Exception Track Event in GA
|
84
|
-
*
|
85
|
-
* @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and
|
86
|
-
* optional fields 'fatal' (boolean) and 'description' (string), error
|
87
|
-
*
|
88
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception
|
89
|
-
*/
|
90
|
-
Angulartics2AppInsights.prototype.exceptionTrack = function (properties) {
|
91
|
-
var description = properties.event || properties.description || properties;
|
92
|
-
appInsights.trackException(description);
|
93
|
-
};
|
94
|
-
/**
|
95
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext
|
96
|
-
*/
|
97
|
-
Angulartics2AppInsights.prototype.setUsername = function (userId) {
|
98
|
-
this.angulartics2.settings.appInsights.userId = userId;
|
99
|
-
appInsights.setAuthenticatedUserContext(userId);
|
100
|
-
};
|
101
|
-
Angulartics2AppInsights.prototype.setUserProperties = function (properties) {
|
102
|
-
if (properties.userId) {
|
103
|
-
this.angulartics2.settings.appInsights.userId = properties.userId;
|
104
|
-
}
|
105
|
-
if (properties.accountId) {
|
106
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId, properties.accountId);
|
107
|
-
}
|
108
|
-
else {
|
109
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId);
|
110
|
-
}
|
111
|
-
};
|
112
|
-
return Angulartics2AppInsights;
|
113
|
-
}());
|
114
|
-
Angulartics2AppInsights.ɵprov = i0.ɵɵdefineInjectable({ factory: function Angulartics2AppInsights_Factory() { return new Angulartics2AppInsights(i0.ɵɵinject(i1.Angulartics2), i0.ɵɵinject(i2.Title), i0.ɵɵinject(i3.Router)); }, token: Angulartics2AppInsights, providedIn: "root" });
|
115
|
-
Angulartics2AppInsights.decorators = [
|
116
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
117
|
-
];
|
118
|
-
Angulartics2AppInsights.ctorParameters = function () { return [
|
119
|
-
{ type: i1.Angulartics2 },
|
120
|
-
{ type: i2.Title },
|
121
|
-
{ type: i3.Router }
|
122
|
-
]; };
|
123
|
-
|
124
|
-
/**
|
125
|
-
* Generated bundle index. Do not edit.
|
126
|
-
*/
|
127
|
-
|
128
|
-
exports.Angulartics2AppInsights = Angulartics2AppInsights;
|
129
|
-
exports.AppInsightsDefaults = AppInsightsDefaults;
|
130
|
-
|
131
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
132
|
-
|
133
|
-
})));
|
134
|
-
//# sourceMappingURL=angulartics2-appinsights.umd.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"angulartics2-appinsights.umd.js","sources":["../../../../src/lib/providers/appinsights/appinsights.ts","../../../../src/lib/providers/appinsights/angulartics2-appinsights.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Router,\n} from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nimport { Angulartics2, AppInsightsSettings } from 'angulartics2';\n\ndeclare const appInsights: Microsoft.ApplicationInsights.IAppInsights;\n\nexport class AppInsightsDefaults implements AppInsightsSettings {\n userId = null;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2AppInsights {\n loadStartTime: number = null;\n loadTime: number = null;\n\n metrics: { [name: string]: number } = null;\n dimensions: { [name: string]: string } = null;\n measurements: { [name: string]: number } = null;\n\n constructor(\n private angulartics2: Angulartics2,\n private title: Title,\n private router: Router,\n ) {\n if (typeof appInsights === 'undefined') {\n console.warn('appInsights not found');\n }\n\n const defaults = new AppInsightsDefaults();\n // Set the default settings for this module\n this.angulartics2.settings.appInsights = { ...defaults, ...this.angulartics2.settings.appInsights };\n this.angulartics2.setUsername\n .subscribe((x: string) => this.setUsername(x));\n this.angulartics2.setUserProperties\n .subscribe((x) => this.setUserProperties(x));\n }\n\n startTracking(): void {\n this.angulartics2.pageTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.pageTrack(x.path));\n this.angulartics2.eventTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.eventTrack(x.action, x.properties));\n this.angulartics2.exceptionTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.exceptionTrack(x));\n this.router.events\n .pipe(\n this.angulartics2.filterDeveloperMode(),\n filter(event => event instanceof NavigationStart),\n )\n .subscribe(event => this.startTimer());\n\n this.router.events\n .pipe(filter(event => event instanceof NavigationError || event instanceof NavigationEnd))\n .subscribe(error => this.stopTimer());\n }\n\n startTimer() {\n this.loadStartTime = Date.now();\n this.loadTime = null;\n }\n\n stopTimer() {\n this.loadTime = Date.now() - this.loadStartTime;\n this.loadStartTime = null;\n }\n\n /**\n * Page Track in Baidu Analytics\n *\n * @param path - Location 'path'\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview\n */\n pageTrack(path: string) {\n appInsights.trackPageView(\n this.title.getTitle(),\n path,\n this.dimensions,\n this.metrics,\n this.loadTime,\n );\n }\n\n /**\n * Log a user action or other occurrence.\n *\n * @param name Name to identify this event in the portal.\n * @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent\n */\n eventTrack(name: string, properties: { [name: string]: string }) {\n appInsights.trackEvent(name, properties, this.measurements);\n }\n\n /**\n * Exception Track Event in GA\n *\n * @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and\n * optional fields 'fatal' (boolean) and 'description' (string), error\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception\n */\n exceptionTrack(properties: any) {\n const description = properties.event || properties.description || properties;\n\n appInsights.trackException(description);\n }\n\n /**\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext\n */\n setUsername(userId: string) {\n this.angulartics2.settings.appInsights.userId = userId;\n appInsights.setAuthenticatedUserContext(userId);\n }\n\n setUserProperties(properties: Partial<{ userId: string, accountId: string }>) {\n if (properties.userId) {\n this.angulartics2.settings.appInsights.userId = properties.userId;\n }\n if (properties.accountId) {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n properties.accountId,\n );\n } else {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n );\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './appinsights';\n"],"names":["filter","NavigationStart","NavigationError","NavigationEnd","Injectable","Angulartics2","Title","Router"],"mappings":";;;;;;;QAcA;YACE,WAAM,GAAG,IAAI,CAAC;SACf;kCAAA;KAAA,IAAA;;QAWC,iCACU,YAA0B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angular/core"),require("@angular/platform-browser"),require("@angular/router"),require("rxjs/operators"),require("angulartics2")):"function"==typeof define&&define.amd?define("angulartics2/appinsights",["exports","@angular/core","@angular/platform-browser","@angular/router","rxjs/operators","angulartics2"],e):e(((t=t||self).angulartics2=t.angulartics2||{},t.angulartics2.appinsights={}),t.ng.core,t.ng.platformBrowser,t.ng.router,t.rxjs.operators,t.angulartics2)}(this,(function(t,e,r,i,s,n){"use strict";var a=function(){this.userId=null},o=function(){function t(t,e,r){var i=this;this.angulartics2=t,this.title=e,this.router=r,this.loadStartTime=null,this.loadTime=null,this.metrics=null,this.dimensions=null,this.measurements=null,"undefined"==typeof appInsights&&console.warn("appInsights not found");var s=new a;this.angulartics2.settings.appInsights=Object.assign(Object.assign({},s),this.angulartics2.settings.appInsights),this.angulartics2.setUsername.subscribe((function(t){return i.setUsername(t)})),this.angulartics2.setUserProperties.subscribe((function(t){return i.setUserProperties(t)}))}return t.prototype.startTracking=function(){var t=this;this.angulartics2.pageTrack.pipe(this.angulartics2.filterDeveloperMode()).subscribe((function(e){return t.pageTrack(e.path)})),this.angulartics2.eventTrack.pipe(this.angulartics2.filterDeveloperMode()).subscribe((function(e){return t.eventTrack(e.action,e.properties)})),this.angulartics2.exceptionTrack.pipe(this.angulartics2.filterDeveloperMode()).subscribe((function(e){return t.exceptionTrack(e)})),this.router.events.pipe(this.angulartics2.filterDeveloperMode(),s.filter((function(t){return t instanceof i.NavigationStart}))).subscribe((function(e){return t.startTimer()})),this.router.events.pipe(s.filter((function(t){return t instanceof i.NavigationError||t instanceof i.NavigationEnd}))).subscribe((function(e){return t.stopTimer()}))},t.prototype.startTimer=function(){this.loadStartTime=Date.now(),this.loadTime=null},t.prototype.stopTimer=function(){this.loadTime=Date.now()-this.loadStartTime,this.loadStartTime=null},t.prototype.pageTrack=function(t){appInsights.trackPageView(this.title.getTitle(),t,this.dimensions,this.metrics,this.loadTime)},t.prototype.eventTrack=function(t,e){appInsights.trackEvent(t,e,this.measurements)},t.prototype.exceptionTrack=function(t){var e=t.event||t.description||t;appInsights.trackException(e)},t.prototype.setUsername=function(t){this.angulartics2.settings.appInsights.userId=t,appInsights.setAuthenticatedUserContext(t)},t.prototype.setUserProperties=function(t){t.userId&&(this.angulartics2.settings.appInsights.userId=t.userId),t.accountId?appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId,t.accountId):appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId)},t}();o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.Angulartics2),e.ɵɵinject(r.Title),e.ɵɵinject(i.Router))},token:o,providedIn:"root"}),o.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:n.Angulartics2},{type:r.Title},{type:i.Router}]},t.Angulartics2AppInsights=o,t.AppInsightsDefaults=a,Object.defineProperty(t,"__esModule",{value:!0})}));
|
2
|
-
//# sourceMappingURL=angulartics2-appinsights.umd.min.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/providers/appinsights/appinsights.ts"],"names":["this","userId","Angulartics2AppInsights","angulartics2","title","router","_this","loadStartTime","loadTime","metrics","dimensions","measurements","appInsights","console","warn","defaults","AppInsightsDefaults","settings","Object","assign","setUsername","subscribe","x","setUserProperties","prototype","startTracking","pageTrack","pipe","filterDeveloperMode","path","eventTrack","action","properties","exceptionTrack","events","filter","event","NavigationStart","startTimer","NavigationError","NavigationEnd","error","stopTimer","Date","now","trackPageView","getTitle","name","trackEvent","description","trackException","setAuthenticatedUserContext","accountId","Injectable","args","providedIn","Angulartics2","Title","Router"],"mappings":"ylBAcA,WACEA,KAAAC,OAAS,mBAYT,SAAAC,EACUC,EACAC,EACAC,GAHV,IAAAC,EAAAN,KACUA,KAAAG,aAAAA,EACAH,KAAAI,MAAAA,EACAJ,KAAAK,OAAAA,EAVVL,KAAAO,cAAwB,KACxBP,KAAAQ,SAAmB,KAEnBR,KAAAS,QAAsC,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KAAKO,cAAgB,MAUvBL,EAAAsB,UAAAE,UAAA,SAAUG,GACRjB,YAAYiC,cACV7C,KAAKI,MAAM0C,WACXjB,EACA7B,KAAKU,WACLV,KAAKS,QACLT,KAAKQ,WAYTN,EAAAsB,UAAAM,WAAA,SAAWiB,EAAcf,GACvBpB,YAAYoC,WAAWD,EAAMf,EAAYhC,KAAKW,eAWhDT,EAAAsB,UAAAS,eAAA,SAAeD,GACb,IAAMiB,EAAcjB,EAAWI,OAASJ,EAAWiB,aAAejB,EAElEpB,YAAYsC,eAAeD,IAM7B/C,EAAAsB,UAAAJ,YAAA,SAAYnB,GACVD,KAAKG,aAAac,SAASL,YAAYX,OAASA,EAChDW,YAAYuC,4BAA4BlD,IAG1CC,EAAAsB,UAAAD,kBAAA,SAAkBS,GACZA,EAAW/B,SACbD,KAAKG,aAAac,SAASL,YAAYX,OAAS+B,EAAW/B,QAEzD+B,EAAWoB,UACbxC,YAAYuC,4BACVnD,KAAKG,aAAac,SAASL,YAAYX,OACvC+B,EAAWoB,WAGbxC,YAAYuC,4BACVnD,KAAKG,aAAac,SAASL,YAAYX,kMAzH9CoD,EAAAA,WAAUC,KAAA,CAAC,CAAEC,WAAY,oDARjBC,EAAAA,oBATAC,EAAAA,aAKPC,EAAAA","sourcesContent":["import { Injectable } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Router,\n} from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nimport { Angulartics2, AppInsightsSettings } from 'angulartics2';\n\ndeclare const appInsights: Microsoft.ApplicationInsights.IAppInsights;\n\nexport class AppInsightsDefaults implements AppInsightsSettings {\n userId = null;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2AppInsights {\n loadStartTime: number = null;\n loadTime: number = null;\n\n metrics: { [name: string]: number } = null;\n dimensions: { [name: string]: string } = null;\n measurements: { [name: string]: number } = null;\n\n constructor(\n private angulartics2: Angulartics2,\n private title: Title,\n private router: Router,\n ) {\n if (typeof appInsights === 'undefined') {\n console.warn('appInsights not found');\n }\n\n const defaults = new AppInsightsDefaults();\n // Set the default settings for this module\n this.angulartics2.settings.appInsights = { ...defaults, ...this.angulartics2.settings.appInsights };\n this.angulartics2.setUsername\n .subscribe((x: string) => this.setUsername(x));\n this.angulartics2.setUserProperties\n .subscribe((x) => this.setUserProperties(x));\n }\n\n startTracking(): void {\n this.angulartics2.pageTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.pageTrack(x.path));\n this.angulartics2.eventTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.eventTrack(x.action, x.properties));\n this.angulartics2.exceptionTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.exceptionTrack(x));\n this.router.events\n .pipe(\n this.angulartics2.filterDeveloperMode(),\n filter(event => event instanceof NavigationStart),\n )\n .subscribe(event => this.startTimer());\n\n this.router.events\n .pipe(filter(event => event instanceof NavigationError || event instanceof NavigationEnd))\n .subscribe(error => this.stopTimer());\n }\n\n startTimer() {\n this.loadStartTime = Date.now();\n this.loadTime = null;\n }\n\n stopTimer() {\n this.loadTime = Date.now() - this.loadStartTime;\n this.loadStartTime = null;\n }\n\n /**\n * Page Track in Baidu Analytics\n *\n * @param path - Location 'path'\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview\n */\n pageTrack(path: string) {\n appInsights.trackPageView(\n this.title.getTitle(),\n path,\n this.dimensions,\n this.metrics,\n this.loadTime,\n );\n }\n\n /**\n * Log a user action or other occurrence.\n *\n * @param name Name to identify this event in the portal.\n * @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent\n */\n eventTrack(name: string, properties: { [name: string]: string }) {\n appInsights.trackEvent(name, properties, this.measurements);\n }\n\n /**\n * Exception Track Event in GA\n *\n * @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and\n * optional fields 'fatal' (boolean) and 'description' (string), error\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception\n */\n exceptionTrack(properties: any) {\n const description = properties.event || properties.description || properties;\n\n appInsights.trackException(description);\n }\n\n /**\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext\n */\n setUsername(userId: string) {\n this.angulartics2.settings.appInsights.userId = userId;\n appInsights.setAuthenticatedUserContext(userId);\n }\n\n setUserProperties(properties: Partial<{ userId: string, accountId: string }>) {\n if (properties.userId) {\n this.angulartics2.settings.appInsights.userId = properties.userId;\n }\n if (properties.accountId) {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n properties.accountId,\n );\n } else {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n );\n }\n }\n}\n"]}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './appinsights';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhcnRpY3MyLWFwcGluc2lnaHRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9wcm92aWRlcnMvYXBwaW5zaWdodHMvYW5ndWxhcnRpY3MyLWFwcGluc2lnaHRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxlQUFlLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vYXBwaW5zaWdodHMnO1xuIl19
|
@@ -1,122 +0,0 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
2
|
-
import { Title } from '@angular/platform-browser';
|
3
|
-
import { NavigationEnd, NavigationError, NavigationStart, Router, } from '@angular/router';
|
4
|
-
import { filter } from 'rxjs/operators';
|
5
|
-
import { Angulartics2 } from 'angulartics2';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
import * as i1 from "angulartics2";
|
8
|
-
import * as i2 from "@angular/platform-browser";
|
9
|
-
import * as i3 from "@angular/router";
|
10
|
-
export class AppInsightsDefaults {
|
11
|
-
constructor() {
|
12
|
-
this.userId = null;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
export class Angulartics2AppInsights {
|
16
|
-
constructor(angulartics2, title, router) {
|
17
|
-
this.angulartics2 = angulartics2;
|
18
|
-
this.title = title;
|
19
|
-
this.router = router;
|
20
|
-
this.loadStartTime = null;
|
21
|
-
this.loadTime = null;
|
22
|
-
this.metrics = null;
|
23
|
-
this.dimensions = null;
|
24
|
-
this.measurements = null;
|
25
|
-
if (typeof appInsights === 'undefined') {
|
26
|
-
console.warn('appInsights not found');
|
27
|
-
}
|
28
|
-
const defaults = new AppInsightsDefaults();
|
29
|
-
// Set the default settings for this module
|
30
|
-
this.angulartics2.settings.appInsights = Object.assign(Object.assign({}, defaults), this.angulartics2.settings.appInsights);
|
31
|
-
this.angulartics2.setUsername
|
32
|
-
.subscribe((x) => this.setUsername(x));
|
33
|
-
this.angulartics2.setUserProperties
|
34
|
-
.subscribe((x) => this.setUserProperties(x));
|
35
|
-
}
|
36
|
-
startTracking() {
|
37
|
-
this.angulartics2.pageTrack
|
38
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
39
|
-
.subscribe((x) => this.pageTrack(x.path));
|
40
|
-
this.angulartics2.eventTrack
|
41
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
42
|
-
.subscribe((x) => this.eventTrack(x.action, x.properties));
|
43
|
-
this.angulartics2.exceptionTrack
|
44
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
45
|
-
.subscribe((x) => this.exceptionTrack(x));
|
46
|
-
this.router.events
|
47
|
-
.pipe(this.angulartics2.filterDeveloperMode(), filter(event => event instanceof NavigationStart))
|
48
|
-
.subscribe(event => this.startTimer());
|
49
|
-
this.router.events
|
50
|
-
.pipe(filter(event => event instanceof NavigationError || event instanceof NavigationEnd))
|
51
|
-
.subscribe(error => this.stopTimer());
|
52
|
-
}
|
53
|
-
startTimer() {
|
54
|
-
this.loadStartTime = Date.now();
|
55
|
-
this.loadTime = null;
|
56
|
-
}
|
57
|
-
stopTimer() {
|
58
|
-
this.loadTime = Date.now() - this.loadStartTime;
|
59
|
-
this.loadStartTime = null;
|
60
|
-
}
|
61
|
-
/**
|
62
|
-
* Page Track in Baidu Analytics
|
63
|
-
*
|
64
|
-
* @param path - Location 'path'
|
65
|
-
*
|
66
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview
|
67
|
-
*/
|
68
|
-
pageTrack(path) {
|
69
|
-
appInsights.trackPageView(this.title.getTitle(), path, this.dimensions, this.metrics, this.loadTime);
|
70
|
-
}
|
71
|
-
/**
|
72
|
-
* Log a user action or other occurrence.
|
73
|
-
*
|
74
|
-
* @param name Name to identify this event in the portal.
|
75
|
-
* @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.
|
76
|
-
*
|
77
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent
|
78
|
-
*/
|
79
|
-
eventTrack(name, properties) {
|
80
|
-
appInsights.trackEvent(name, properties, this.measurements);
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* Exception Track Event in GA
|
84
|
-
*
|
85
|
-
* @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and
|
86
|
-
* optional fields 'fatal' (boolean) and 'description' (string), error
|
87
|
-
*
|
88
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception
|
89
|
-
*/
|
90
|
-
exceptionTrack(properties) {
|
91
|
-
const description = properties.event || properties.description || properties;
|
92
|
-
appInsights.trackException(description);
|
93
|
-
}
|
94
|
-
/**
|
95
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext
|
96
|
-
*/
|
97
|
-
setUsername(userId) {
|
98
|
-
this.angulartics2.settings.appInsights.userId = userId;
|
99
|
-
appInsights.setAuthenticatedUserContext(userId);
|
100
|
-
}
|
101
|
-
setUserProperties(properties) {
|
102
|
-
if (properties.userId) {
|
103
|
-
this.angulartics2.settings.appInsights.userId = properties.userId;
|
104
|
-
}
|
105
|
-
if (properties.accountId) {
|
106
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId, properties.accountId);
|
107
|
-
}
|
108
|
-
else {
|
109
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId);
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
Angulartics2AppInsights.ɵprov = i0.ɵɵdefineInjectable({ factory: function Angulartics2AppInsights_Factory() { return new Angulartics2AppInsights(i0.ɵɵinject(i1.Angulartics2), i0.ɵɵinject(i2.Title), i0.ɵɵinject(i3.Router)); }, token: Angulartics2AppInsights, providedIn: "root" });
|
114
|
-
Angulartics2AppInsights.decorators = [
|
115
|
-
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
116
|
-
];
|
117
|
-
Angulartics2AppInsights.ctorParameters = () => [
|
118
|
-
{ type: Angulartics2 },
|
119
|
-
{ type: Title },
|
120
|
-
{ type: Router }
|
121
|
-
];
|
122
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwaW5zaWdodHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL3Byb3ZpZGVycy9hcHBpbnNpZ2h0cy9hcHBpbnNpZ2h0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFB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BodHRwczovL2dpdGh1Yi5jb20vTWljcm9zb2Z0L0FwcGxpY2F0aW9uSW5zaWdodHMtSlMvYmxvYi9tYXN0ZXIvQVBJLXJlZmVyZW5jZS5tZCNzZXRhdXRoZW50aWNhdGVkdXNlcmNvbnRleHRcbiAgICovXG4gIHNldFVzZXJuYW1lKHVzZXJJZDogc3RyaW5nKSB7XG4gICAgdGhpcy5hbmd1bGFydGljczIuc2V0dGluZ3MuYXBwSW5zaWdodHMudXNlcklkID0gdXNlcklkO1xuICAgIGFwcEluc2lnaHRzLnNldEF1dGhlbnRpY2F0ZWRVc2VyQ29udGV4dCh1c2VySWQpO1xuICB9XG5cbiAgc2V0VXNlclByb3BlcnRpZXMocHJvcGVydGllczogUGFydGlhbDx7IHVzZXJJZDogc3RyaW5nLCBhY2NvdW50SWQ6IHN0cmluZyB9Pikge1xuICAgIGlmIChwcm9wZXJ0aWVzLnVzZXJJZCkge1xuICAgICAgdGhpcy5hbmd1bGFydGljczIuc2V0dGluZ3MuYXBwSW5zaWdodHMudXNlcklkID0gcHJvcGVydGllcy51c2VySWQ7XG4gICAgfVxuICAgIGlmIChwcm9wZXJ0aWVzLmFjY291bnRJZCkge1xuICAgICAgYXBwSW5zaWdodHMuc2V0QXV0aGVudGljYXRlZFVzZXJDb250ZXh0KFxuICAgICAgICB0aGlzLmFuZ3VsYXJ0aWNzMi5zZXR0aW5ncy5hcHBJbnNpZ2h0cy51c2VySWQsXG4gICAgICAgIHByb3BlcnRpZXMuYWNjb3VudElkLFxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgYXBwSW5zaWdodHMuc2V0QXV0aGVudGljYXRlZFVzZXJDb250ZXh0KFxuICAgICAgICB0aGlzLmFuZ3VsYXJ0aWNzMi5zZXR0aW5ncy5hcHBJbnNpZ2h0cy51c2VySWQsXG4gICAgICApO1xuICAgIH1cbiAgfVxufVxuIl19
|
@@ -1,125 +0,0 @@
|
|
1
|
-
import { ɵɵdefineInjectable, ɵɵinject, Injectable } from '@angular/core';
|
2
|
-
import { Title } from '@angular/platform-browser';
|
3
|
-
import { NavigationStart, NavigationError, NavigationEnd, Router } from '@angular/router';
|
4
|
-
import { filter } from 'rxjs/operators';
|
5
|
-
import { Angulartics2 } from 'angulartics2';
|
6
|
-
|
7
|
-
class AppInsightsDefaults {
|
8
|
-
constructor() {
|
9
|
-
this.userId = null;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
class Angulartics2AppInsights {
|
13
|
-
constructor(angulartics2, title, router) {
|
14
|
-
this.angulartics2 = angulartics2;
|
15
|
-
this.title = title;
|
16
|
-
this.router = router;
|
17
|
-
this.loadStartTime = null;
|
18
|
-
this.loadTime = null;
|
19
|
-
this.metrics = null;
|
20
|
-
this.dimensions = null;
|
21
|
-
this.measurements = null;
|
22
|
-
if (typeof appInsights === 'undefined') {
|
23
|
-
console.warn('appInsights not found');
|
24
|
-
}
|
25
|
-
const defaults = new AppInsightsDefaults();
|
26
|
-
// Set the default settings for this module
|
27
|
-
this.angulartics2.settings.appInsights = Object.assign(Object.assign({}, defaults), this.angulartics2.settings.appInsights);
|
28
|
-
this.angulartics2.setUsername
|
29
|
-
.subscribe((x) => this.setUsername(x));
|
30
|
-
this.angulartics2.setUserProperties
|
31
|
-
.subscribe((x) => this.setUserProperties(x));
|
32
|
-
}
|
33
|
-
startTracking() {
|
34
|
-
this.angulartics2.pageTrack
|
35
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
36
|
-
.subscribe((x) => this.pageTrack(x.path));
|
37
|
-
this.angulartics2.eventTrack
|
38
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
39
|
-
.subscribe((x) => this.eventTrack(x.action, x.properties));
|
40
|
-
this.angulartics2.exceptionTrack
|
41
|
-
.pipe(this.angulartics2.filterDeveloperMode())
|
42
|
-
.subscribe((x) => this.exceptionTrack(x));
|
43
|
-
this.router.events
|
44
|
-
.pipe(this.angulartics2.filterDeveloperMode(), filter(event => event instanceof NavigationStart))
|
45
|
-
.subscribe(event => this.startTimer());
|
46
|
-
this.router.events
|
47
|
-
.pipe(filter(event => event instanceof NavigationError || event instanceof NavigationEnd))
|
48
|
-
.subscribe(error => this.stopTimer());
|
49
|
-
}
|
50
|
-
startTimer() {
|
51
|
-
this.loadStartTime = Date.now();
|
52
|
-
this.loadTime = null;
|
53
|
-
}
|
54
|
-
stopTimer() {
|
55
|
-
this.loadTime = Date.now() - this.loadStartTime;
|
56
|
-
this.loadStartTime = null;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Page Track in Baidu Analytics
|
60
|
-
*
|
61
|
-
* @param path - Location 'path'
|
62
|
-
*
|
63
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview
|
64
|
-
*/
|
65
|
-
pageTrack(path) {
|
66
|
-
appInsights.trackPageView(this.title.getTitle(), path, this.dimensions, this.metrics, this.loadTime);
|
67
|
-
}
|
68
|
-
/**
|
69
|
-
* Log a user action or other occurrence.
|
70
|
-
*
|
71
|
-
* @param name Name to identify this event in the portal.
|
72
|
-
* @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.
|
73
|
-
*
|
74
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent
|
75
|
-
*/
|
76
|
-
eventTrack(name, properties) {
|
77
|
-
appInsights.trackEvent(name, properties, this.measurements);
|
78
|
-
}
|
79
|
-
/**
|
80
|
-
* Exception Track Event in GA
|
81
|
-
*
|
82
|
-
* @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and
|
83
|
-
* optional fields 'fatal' (boolean) and 'description' (string), error
|
84
|
-
*
|
85
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception
|
86
|
-
*/
|
87
|
-
exceptionTrack(properties) {
|
88
|
-
const description = properties.event || properties.description || properties;
|
89
|
-
appInsights.trackException(description);
|
90
|
-
}
|
91
|
-
/**
|
92
|
-
* @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext
|
93
|
-
*/
|
94
|
-
setUsername(userId) {
|
95
|
-
this.angulartics2.settings.appInsights.userId = userId;
|
96
|
-
appInsights.setAuthenticatedUserContext(userId);
|
97
|
-
}
|
98
|
-
setUserProperties(properties) {
|
99
|
-
if (properties.userId) {
|
100
|
-
this.angulartics2.settings.appInsights.userId = properties.userId;
|
101
|
-
}
|
102
|
-
if (properties.accountId) {
|
103
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId, properties.accountId);
|
104
|
-
}
|
105
|
-
else {
|
106
|
-
appInsights.setAuthenticatedUserContext(this.angulartics2.settings.appInsights.userId);
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
Angulartics2AppInsights.ɵprov = ɵɵdefineInjectable({ factory: function Angulartics2AppInsights_Factory() { return new Angulartics2AppInsights(ɵɵinject(Angulartics2), ɵɵinject(Title), ɵɵinject(Router)); }, token: Angulartics2AppInsights, providedIn: "root" });
|
111
|
-
Angulartics2AppInsights.decorators = [
|
112
|
-
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
113
|
-
];
|
114
|
-
Angulartics2AppInsights.ctorParameters = () => [
|
115
|
-
{ type: Angulartics2 },
|
116
|
-
{ type: Title },
|
117
|
-
{ type: Router }
|
118
|
-
];
|
119
|
-
|
120
|
-
/**
|
121
|
-
* Generated bundle index. Do not edit.
|
122
|
-
*/
|
123
|
-
|
124
|
-
export { Angulartics2AppInsights, AppInsightsDefaults };
|
125
|
-
//# sourceMappingURL=angulartics2-appinsights.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"angulartics2-appinsights.js","sources":["../../../../src/lib/providers/appinsights/appinsights.ts","../../../../src/lib/providers/appinsights/angulartics2-appinsights.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Router,\n} from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nimport { Angulartics2, AppInsightsSettings } from 'angulartics2';\n\ndeclare const appInsights: Microsoft.ApplicationInsights.IAppInsights;\n\nexport class AppInsightsDefaults implements AppInsightsSettings {\n userId = null;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2AppInsights {\n loadStartTime: number = null;\n loadTime: number = null;\n\n metrics: { [name: string]: number } = null;\n dimensions: { [name: string]: string } = null;\n measurements: { [name: string]: number } = null;\n\n constructor(\n private angulartics2: Angulartics2,\n private title: Title,\n private router: Router,\n ) {\n if (typeof appInsights === 'undefined') {\n console.warn('appInsights not found');\n }\n\n const defaults = new AppInsightsDefaults();\n // Set the default settings for this module\n this.angulartics2.settings.appInsights = { ...defaults, ...this.angulartics2.settings.appInsights };\n this.angulartics2.setUsername\n .subscribe((x: string) => this.setUsername(x));\n this.angulartics2.setUserProperties\n .subscribe((x) => this.setUserProperties(x));\n }\n\n startTracking(): void {\n this.angulartics2.pageTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.pageTrack(x.path));\n this.angulartics2.eventTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.eventTrack(x.action, x.properties));\n this.angulartics2.exceptionTrack\n .pipe(this.angulartics2.filterDeveloperMode())\n .subscribe((x) => this.exceptionTrack(x));\n this.router.events\n .pipe(\n this.angulartics2.filterDeveloperMode(),\n filter(event => event instanceof NavigationStart),\n )\n .subscribe(event => this.startTimer());\n\n this.router.events\n .pipe(filter(event => event instanceof NavigationError || event instanceof NavigationEnd))\n .subscribe(error => this.stopTimer());\n }\n\n startTimer() {\n this.loadStartTime = Date.now();\n this.loadTime = null;\n }\n\n stopTimer() {\n this.loadTime = Date.now() - this.loadStartTime;\n this.loadStartTime = null;\n }\n\n /**\n * Page Track in Baidu Analytics\n *\n * @param path - Location 'path'\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview\n */\n pageTrack(path: string) {\n appInsights.trackPageView(\n this.title.getTitle(),\n path,\n this.dimensions,\n this.metrics,\n this.loadTime,\n );\n }\n\n /**\n * Log a user action or other occurrence.\n *\n * @param name Name to identify this event in the portal.\n * @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent\n */\n eventTrack(name: string, properties: { [name: string]: string }) {\n appInsights.trackEvent(name, properties, this.measurements);\n }\n\n /**\n * Exception Track Event in GA\n *\n * @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and\n * optional fields 'fatal' (boolean) and 'description' (string), error\n *\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception\n */\n exceptionTrack(properties: any) {\n const description = properties.event || properties.description || properties;\n\n appInsights.trackException(description);\n }\n\n /**\n * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext\n */\n setUsername(userId: string) {\n this.angulartics2.settings.appInsights.userId = userId;\n appInsights.setAuthenticatedUserContext(userId);\n }\n\n setUserProperties(properties: Partial<{ userId: string, accountId: string }>) {\n if (properties.userId) {\n this.angulartics2.settings.appInsights.userId = properties.userId;\n }\n if (properties.accountId) {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n properties.accountId,\n );\n } else {\n appInsights.setAuthenticatedUserContext(\n this.angulartics2.settings.appInsights.userId,\n );\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './appinsights';\n"],"names":[],"mappings":";;;;;;MAca,mBAAmB;IAAhC;QACE,WAAM,GAAG,IAAI,CAAC;KACf;CAAA;MAGY,uBAAuB;IAQlC,YACU,YAA0B,EAC1B,KAAY,EACZ,MAAc;QAFd,iBAAY,GAAZ,YAAY,CAAc;QAC1B,UAAK,GAAL,KAAK,CAAO;QACZ,WAAM,GAAN,MAAM,CAAQ;QAVxB,kBAAa,GAAW,IAAI,CAAC;QAC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ACzC;;;;IAKD,WAAW,CAAC,MAAc;QACxB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;QACvD,WAAW,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;KACjD;IAED,iBAAiB,CAAC,UAA0D;QAC1E,IAAI,UAAU,CAAC,MAAM,EAAE;YACrB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;SACnE;QACD,IAAI,UAAU,CAAC,SAAS,EAAE;YACxB,WAAW,CAAC,2BAA2B,CACrC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAC7C,UAAU,CAAC,SAAS,CACrB,CAAC;SACH;aAAM;YACL,WAAW,CAAC,2BAA2B,CACrC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAC9C,CAAC;SACH;KACF;;;;YA5HF,UAAU,SAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;YARzB,YAAY;YATZ,KAAK;YAKZ,MAAM;;;ACNR;;;;;;"}
|
package/appinsights/package.json
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "../../../../node_modules/ng-packagr/package.schema.json",
|
3
|
-
"name": "angulartics2/appinsights",
|
4
|
-
"description": "The appinsights module",
|
5
|
-
"homepage": "https://angulartics.github.io/angulartics2/",
|
6
|
-
"author": "João Ribeiro <jonnybgod@gmail.com> (http://github.com/JonnyBGod)",
|
7
|
-
"repository": "angulartics/angulartics2",
|
8
|
-
"license": "MIT",
|
9
|
-
"main": "bundles/angulartics2-appinsights.umd.js",
|
10
|
-
"module": "fesm2015/angulartics2-appinsights.js",
|
11
|
-
"es2015": "fesm2015/angulartics2-appinsights.js",
|
12
|
-
"esm2015": "esm2015/angulartics2-appinsights.js",
|
13
|
-
"fesm2015": "fesm2015/angulartics2-appinsights.js",
|
14
|
-
"typings": "angulartics2-appinsights.d.ts",
|
15
|
-
"metadata": "angulartics2-appinsights.metadata.json",
|
16
|
-
"sideEffects": false,
|
17
|
-
"dependencies": {
|
18
|
-
"tslib": "^2.0.0"
|
19
|
-
}
|
20
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"Angulartics2BaiduAnalytics":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"angulartics2","name":"Angulartics2","line":9,"character":36}]}],"startTracking":[{"__symbolic":"method"}],"pageTrack":[{"__symbolic":"method"}],"eventTrack":[{"__symbolic":"method"}],"setUsername":[{"__symbolic":"method"}],"setUserProperties":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"Angulartics2BaiduAnalytics":"./baidu"},"importAs":"angulartics2/baidu"}
|