@armco/analytics 0.0.4 → 0.0.5

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/dist/analytics.js CHANGED
@@ -203,6 +203,9 @@ function trackEvent(event, data) {
203
203
  return;
204
204
  }
205
205
  enrichEventData(data);
206
+ if (hostProjectName && hostProjectName.startsWith("@armco")) {
207
+ enableTracking(true);
208
+ }
206
209
  (CONFIG === null || CONFIG === void 0 ? void 0 : CONFIG.submissionStrategy) === "DEFER" ? queueEvent(data) : sendAnalyticsData(data);
207
210
  }
208
211
  else {
@@ -225,6 +228,7 @@ function isEnabled() {
225
228
  if (typeof navigator !== 'undefined' && 'doNotTrack' in navigator) {
226
229
  const doNotTrackValue = navigator.doNotTrack;
227
230
  if (doNotTrackValue === '1' || doNotTrackValue === 'yes') {
231
+ console.warn("[ANALYTICS] Tracking disabled in client, events will not be logged!");
228
232
  return false;
229
233
  }
230
234
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armco/analytics",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Browser Based Analytics interceptor for configured events",
5
5
  "main": "index.js",
6
6
  "type": "module",