@armco/analytics 0.0.9 → 0.0.10

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.
Files changed (2) hide show
  1. package/dist/analytics.js +21 -5
  2. package/package.json +1 -1
package/dist/analytics.js CHANGED
@@ -345,10 +345,26 @@ function sendHostProjectName() {
345
345
  }
346
346
  function showTrackingPopup() {
347
347
  const popupContent = `
348
- <div class="tracking-popup">
349
- <p>We use cookies to collect and analyze data to improve our website. By clicking "Accept," you consent to the use of cookies.</p>
350
- <button class="btn-accept">Accept</button>
351
- <button class="btn-decline">Decline</button>
348
+ <div class="tracking-popup" style="position: fixed;
349
+ width: 50%;
350
+ left: 25%;
351
+ bottom: 2rem;
352
+ padding: 1rem;
353
+ background: aliceblue;
354
+ border-radius: 5px;
355
+ display: flex;
356
+ border: 1px solid #ccc;
357
+ justify-content: space-between;">
358
+ <p style="width: 80%;">We use cookies to collect and analyze data to improve our website. By clicking "Accept," you consent to the use of cookies.</p>
359
+ <a class="btn-accept" style="display: flex;
360
+ align-items: center;
361
+ font-weight: bold;
362
+ cursor: pointer;"
363
+ onClick="${(e) => {
364
+ e.preventDefault();
365
+ enableTracking(true);
366
+ }};"
367
+ >Got it!</a>
352
368
  </div>
353
369
  `;
354
370
  $('body').append(popupContent);
@@ -373,7 +389,7 @@ function init() {
373
389
  analyticsEndpoint = CONFIG.analyticsEndpoint || null;
374
390
  hostProjectName = CONFIG.hostProjectName || (yield getHostProjectName()) || null;
375
391
  console.log("[ANALYTICS] Display Tracker Popup");
376
- showTrackingPopup();
392
+ CONFIG.showPopUp && showTrackingPopup();
377
393
  console.log("[ANALYTICS] Hook Event Trackers");
378
394
  hookTrackers();
379
395
  console.log("[ANALYTICS] Hook Handlers to flush events (use when submisstionStrategy is configures as \"DEFER\"");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armco/analytics",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Browser Based Analytics interceptor for configured events",
5
5
  "main": "index.js",
6
6
  "type": "module",