@reykjavik/webtools 0.1.7 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -4,11 +4,12 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
- ## 0.1.7
7
+ ## 0.1.7 – 0.1.8
8
8
 
9
9
  _2023-04-19_
10
10
 
11
11
  - `@reykjavik/webtools/next/SiteImprove`:
12
+ - feat: Always push events to `window._sz`, even in development mode
12
13
  - feat: Auto-track outbound link clicks, also for late-injected elements.
13
14
  - feat: Add `pingSiteImproveOutbound` helper
14
15
  - fix: Strip pageview ref URLs on history back/forward traversal
@@ -14,12 +14,10 @@ const _emitEvent = typeof window === 'undefined'
14
14
  _sz = window._sz = [];
15
15
  _sz._jit_defined_ = true;
16
16
  }
17
+ _sz.push(event);
17
18
  if (process.env.NODE_ENV === 'development') {
18
19
  console.info('SiteImprove:', event);
19
20
  }
20
- else {
21
- _sz.push(event);
22
- }
23
21
  };
24
22
  /*
25
23
  SiteImprove's "trackdynamic" (page view) event requires both the new URL
@@ -43,12 +43,10 @@ const _emitEvent = typeof window === 'undefined'
43
43
  _sz = window._sz = [];
44
44
  _sz._jit_defined_ = true;
45
45
  }
46
+ _sz.push(event);
46
47
  if (process.env.NODE_ENV === 'development') {
47
48
  console.info('SiteImprove:', event);
48
49
  }
49
- else {
50
- _sz.push(event);
51
- }
52
50
  };
53
51
  /*
54
52
  SiteImprove's "trackdynamic" (page view) event requires both the new URL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reykjavik/webtools",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Misc. JS/TS helpers used by Reykjavík City's web dev teams.",
5
5
  "main": "index.js",
6
6
  "repository": "ssh://git@github.com:reykjavikcity/webtools.git",