@next/third-parties 15.0.0-canary.152 → 15.0.0-canary.154
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/google/ga.js +2 -2
- package/dist/google/gtm.js +2 -2
- package/dist/types/google.d.ts +2 -0
- package/package.json +2 -2
package/dist/google/ga.js
CHANGED
|
@@ -12,7 +12,7 @@ const react_1 = require("react");
|
|
|
12
12
|
const script_1 = __importDefault(require("next/script"));
|
|
13
13
|
let currDataLayerName = undefined;
|
|
14
14
|
function GoogleAnalytics(props) {
|
|
15
|
-
const { gaId, dataLayerName = 'dataLayer' } = props;
|
|
15
|
+
const { gaId, dataLayerName = 'dataLayer', nonce } = props;
|
|
16
16
|
if (currDataLayerName === undefined) {
|
|
17
17
|
currDataLayerName = dataLayerName;
|
|
18
18
|
}
|
|
@@ -34,7 +34,7 @@ function GoogleAnalytics(props) {
|
|
|
34
34
|
gtag('js', new Date());
|
|
35
35
|
|
|
36
36
|
gtag('config', '${gaId}');`,
|
|
37
|
-
} }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "_next-ga", src: `https://www.googletagmanager.com/gtag/js?id=${gaId}
|
|
37
|
+
}, nonce: nonce }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "_next-ga", src: `https://www.googletagmanager.com/gtag/js?id=${gaId}`, nonce: nonce })] }));
|
|
38
38
|
}
|
|
39
39
|
function sendGAEvent(..._args) {
|
|
40
40
|
if (currDataLayerName === undefined) {
|
package/dist/google/gtm.js
CHANGED
|
@@ -12,7 +12,7 @@ const react_1 = require("react");
|
|
|
12
12
|
const script_1 = __importDefault(require("next/script"));
|
|
13
13
|
let currDataLayerName = undefined;
|
|
14
14
|
function GoogleTagManager(props) {
|
|
15
|
-
const { gtmId, dataLayerName = 'dataLayer', auth, preview, dataLayer } = props;
|
|
15
|
+
const { gtmId, dataLayerName = 'dataLayer', auth, preview, dataLayer, nonce, } = props;
|
|
16
16
|
if (currDataLayerName === undefined) {
|
|
17
17
|
currDataLayerName = dataLayerName;
|
|
18
18
|
}
|
|
@@ -37,7 +37,7 @@ function GoogleTagManager(props) {
|
|
|
37
37
|
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
|
|
38
38
|
${dataLayer ? `w[l].push(${JSON.stringify(dataLayer)})` : ''}
|
|
39
39
|
})(window,'${dataLayerName}');`,
|
|
40
|
-
} }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "_next-gtm", "data-ntpc": "GTM", src: `https://www.googletagmanager.com/gtm.js?id=${gtmId}${gtmLayer}${gtmAuth}${gtmPreview}
|
|
40
|
+
}, nonce: nonce }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "_next-gtm", "data-ntpc": "GTM", src: `https://www.googletagmanager.com/gtm.js?id=${gtmId}${gtmLayer}${gtmAuth}${gtmPreview}`, nonce: nonce })] }));
|
|
41
41
|
}
|
|
42
42
|
const sendGTMEvent = (data) => {
|
|
43
43
|
if (currDataLayerName === undefined) {
|
package/dist/types/google.d.ts
CHANGED
|
@@ -15,10 +15,12 @@ export type GTMParams = {
|
|
|
15
15
|
dataLayerName?: string;
|
|
16
16
|
auth?: string;
|
|
17
17
|
preview?: string;
|
|
18
|
+
nonce?: string;
|
|
18
19
|
};
|
|
19
20
|
export type GAParams = {
|
|
20
21
|
gaId: string;
|
|
21
22
|
dataLayerName?: string;
|
|
23
|
+
nonce?: string;
|
|
22
24
|
};
|
|
23
25
|
export type GoogleMapsEmbed = {
|
|
24
26
|
height?: number | string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next/third-parties",
|
|
3
|
-
"version": "15.0.0-canary.
|
|
3
|
+
"version": "15.0.0-canary.154",
|
|
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": "15.0.0-canary.
|
|
29
|
+
"next": "15.0.0-canary.154",
|
|
30
30
|
"outdent": "0.8.0",
|
|
31
31
|
"prettier": "2.5.1"
|
|
32
32
|
},
|