eddev 0.2.20 → 0.2.21
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.
|
@@ -3,10 +3,13 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
3
3
|
$schema: z.ZodOptional<z.ZodString>;
|
|
4
4
|
tracking: z.ZodOptional<z.ZodObject<{
|
|
5
5
|
tagManagerID: z.ZodOptional<z.ZodString>;
|
|
6
|
+
analyticsID: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
tagManagerID?: string | undefined;
|
|
9
|
+
analyticsID?: string | undefined;
|
|
8
10
|
}, {
|
|
9
11
|
tagManagerID?: string | undefined;
|
|
12
|
+
analyticsID?: string | undefined;
|
|
10
13
|
}>>;
|
|
11
14
|
serverless: z.ZodOptional<z.ZodObject<{
|
|
12
15
|
enabled: z.ZodBoolean;
|
|
@@ -54,6 +57,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
54
57
|
$schema?: string | undefined;
|
|
55
58
|
tracking?: {
|
|
56
59
|
tagManagerID?: string | undefined;
|
|
60
|
+
analyticsID?: string | undefined;
|
|
57
61
|
} | undefined;
|
|
58
62
|
serverless?: {
|
|
59
63
|
themeAssets?: string[] | undefined;
|
|
@@ -75,6 +79,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
75
79
|
$schema?: string | undefined;
|
|
76
80
|
tracking?: {
|
|
77
81
|
tagManagerID?: string | undefined;
|
|
82
|
+
analyticsID?: string | undefined;
|
|
78
83
|
} | undefined;
|
|
79
84
|
serverless?: {
|
|
80
85
|
themeAssets?: string[] | undefined;
|
package/config/config-schema.js
CHANGED
package/config/get-config.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare function getEDConfig(dir?: string): import("zod").SafeParseReturn
|
|
|
2
2
|
$schema?: string | undefined;
|
|
3
3
|
tracking?: {
|
|
4
4
|
tagManagerID?: string | undefined;
|
|
5
|
+
analyticsID?: string | undefined;
|
|
5
6
|
} | undefined;
|
|
6
7
|
serverless?: {
|
|
7
8
|
themeAssets?: string[] | undefined;
|
|
@@ -23,6 +24,7 @@ export declare function getEDConfig(dir?: string): import("zod").SafeParseReturn
|
|
|
23
24
|
$schema?: string | undefined;
|
|
24
25
|
tracking?: {
|
|
25
26
|
tagManagerID?: string | undefined;
|
|
27
|
+
analyticsID?: string | undefined;
|
|
26
28
|
} | undefined;
|
|
27
29
|
serverless?: {
|
|
28
30
|
themeAssets?: string[] | undefined;
|
|
@@ -45,6 +47,7 @@ export declare function getEDConfigUnwrapped(dir?: string): {
|
|
|
45
47
|
$schema?: string | undefined;
|
|
46
48
|
tracking?: {
|
|
47
49
|
tagManagerID?: string | undefined;
|
|
50
|
+
analyticsID?: string | undefined;
|
|
48
51
|
} | undefined;
|
|
49
52
|
serverless?: {
|
|
50
53
|
themeAssets?: string[] | undefined;
|
package/config/parse-config.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare function parseConfig(config: any): import("zod").SafeParseReturnT
|
|
|
2
2
|
$schema?: string | undefined;
|
|
3
3
|
tracking?: {
|
|
4
4
|
tagManagerID?: string | undefined;
|
|
5
|
+
analyticsID?: string | undefined;
|
|
5
6
|
} | undefined;
|
|
6
7
|
serverless?: {
|
|
7
8
|
themeAssets?: string[] | undefined;
|
|
@@ -23,6 +24,7 @@ export declare function parseConfig(config: any): import("zod").SafeParseReturnT
|
|
|
23
24
|
$schema?: string | undefined;
|
|
24
25
|
tracking?: {
|
|
25
26
|
tagManagerID?: string | undefined;
|
|
27
|
+
analyticsID?: string | undefined;
|
|
26
28
|
} | undefined;
|
|
27
29
|
serverless?: {
|
|
28
30
|
themeAssets?: string[] | undefined;
|
|
@@ -53,7 +53,6 @@ var react_2 = require("react");
|
|
|
53
53
|
var react_3 = require("react");
|
|
54
54
|
var reducer = function (state, action) {
|
|
55
55
|
var _a, _b, _c;
|
|
56
|
-
console.log("Dispatch", state, action);
|
|
57
56
|
switch (action.type) {
|
|
58
57
|
case "field":
|
|
59
58
|
return __assign(__assign({}, state), { errors: __assign(__assign({}, state.errors), (_a = {}, _a[action.id] = undefined, _a)), values: __assign(__assign({}, state.values), (_b = {}, _b[action.id] = action.value, _b)) });
|
|
@@ -99,7 +98,6 @@ function useGravityForm(opts) {
|
|
|
99
98
|
submit(form, state).then(function (result) {
|
|
100
99
|
if (cancelled)
|
|
101
100
|
return;
|
|
102
|
-
console.log("Submitted", result);
|
|
103
101
|
if (result.success) {
|
|
104
102
|
dispatch({ type: "success", message: result.successMessage || "" });
|
|
105
103
|
}
|
package/package.json
CHANGED
|
@@ -19,10 +19,29 @@ export default class Document extends NextDocument {
|
|
|
19
19
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
20
20
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
21
21
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
22
|
-
})(window,document,'script','dataLayer',${JSON.stringify(settings.tracking.tagManagerID)})
|
|
22
|
+
})(window,document,'script','dataLayer',${JSON.stringify(settings.tracking.tagManagerID)});`,
|
|
23
23
|
}}
|
|
24
24
|
></script>
|
|
25
25
|
) : null}
|
|
26
|
+
{settings.tracking?.analyticsID ? (
|
|
27
|
+
<>
|
|
28
|
+
<script
|
|
29
|
+
async
|
|
30
|
+
src={`https://www.googletagmanager.com/gtag/js?id={settings.tracking.analyticsID}`}
|
|
31
|
+
></script>
|
|
32
|
+
<script
|
|
33
|
+
dangerouslySetInnerHTML={{
|
|
34
|
+
__html: `
|
|
35
|
+
window.dataLayer = window.dataLayer || [];
|
|
36
|
+
function gtag(){dataLayer.push(arguments);}
|
|
37
|
+
gtag('js', new Date());
|
|
38
|
+
|
|
39
|
+
gtag('config', "${settings.tracking.analyticsID}");
|
|
40
|
+
`,
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
44
|
+
) : null}
|
|
26
45
|
</Head>
|
|
27
46
|
<body>
|
|
28
47
|
{settings.tracking?.tagManagerID ? (
|