@next/third-parties 14.1.2-canary.7 → 14.1.3

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.
@@ -5,4 +5,4 @@ declare global {
5
5
  }
6
6
  }
7
7
  export declare function GoogleAnalytics(props: GAParams): import("react/jsx-runtime").JSX.Element;
8
- export declare function sendGAEvent(..._args: Object[]): void;
8
+ export declare const sendGAEvent: (...args: Object[]) => void;
package/dist/google/ga.js CHANGED
@@ -36,16 +36,16 @@ function GoogleAnalytics(props) {
36
36
  } }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "_next-ga", src: `https://www.googletagmanager.com/gtag/js?id=${gaId}` })] }));
37
37
  }
38
38
  exports.GoogleAnalytics = GoogleAnalytics;
39
- function sendGAEvent(..._args) {
39
+ const sendGAEvent = (...args) => {
40
40
  if (currDataLayerName === undefined) {
41
41
  console.warn(`@next/third-parties: GA has not been initialized`);
42
42
  return;
43
43
  }
44
44
  if (window[currDataLayerName]) {
45
- window[currDataLayerName].push(arguments);
45
+ window[currDataLayerName].push(...args);
46
46
  }
47
47
  else {
48
48
  console.warn(`@next/third-parties: GA dataLayer ${currDataLayerName} does not exist`);
49
49
  }
50
- }
50
+ };
51
51
  exports.sendGAEvent = sendGAEvent;
@@ -15,7 +15,7 @@ function GoogleTagManager(props) {
15
15
  if (currDataLayerName === undefined) {
16
16
  currDataLayerName = dataLayerName;
17
17
  }
18
- const gtmLayer = dataLayerName !== 'dataLayer' ? `&l=${dataLayerName}` : '';
18
+ const gtmLayer = dataLayerName !== 'dataLayer' ? `$l=${dataLayerName}` : '';
19
19
  const gtmAuth = auth ? `&gtm_auth=${auth}` : '';
20
20
  const gtmPreview = preview ? `&gtm_preview=${preview}&gtm_cookies_win=x` : '';
21
21
  (0, react_1.useEffect)(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/third-parties",
3
- "version": "14.1.2-canary.7",
3
+ "version": "14.1.3",
4
4
  "repository": {
5
5
  "url": "vercel/next.js",
6
6
  "directory": "packages/third-parties"
@@ -26,7 +26,7 @@
26
26
  "third-party-capital": "1.0.20"
27
27
  },
28
28
  "devDependencies": {
29
- "next": "14.1.2-canary.7",
29
+ "next": "14.1.3",
30
30
  "outdent": "0.8.0",
31
31
  "prettier": "2.5.1"
32
32
  },