cja-phoenix 1.2.23 → 1.2.24
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/module.json
CHANGED
|
@@ -13,6 +13,8 @@ export const useCjaGtm = (vertical, source) => {
|
|
|
13
13
|
return "broadband";
|
|
14
14
|
case "CI":
|
|
15
15
|
return "car-insurance-funnel";
|
|
16
|
+
case "CC":
|
|
17
|
+
return "credit-card";
|
|
16
18
|
}
|
|
17
19
|
})();
|
|
18
20
|
const { formType, location } = (() => {
|
|
@@ -130,6 +132,28 @@ export const useCjaGtm = (vertical, source) => {
|
|
|
130
132
|
quantity: 1
|
|
131
133
|
}
|
|
132
134
|
];
|
|
135
|
+
case "credit-card":
|
|
136
|
+
return [
|
|
137
|
+
{
|
|
138
|
+
name: product.description,
|
|
139
|
+
id: product.cggId,
|
|
140
|
+
brand: product.name,
|
|
141
|
+
position: index,
|
|
142
|
+
approvalRate: product.approvalRate,
|
|
143
|
+
dimension3: source2,
|
|
144
|
+
dimension4: product.banner.bannerType,
|
|
145
|
+
dimension5: product.showCTALeadCapture,
|
|
146
|
+
dimension6: `
|
|
147
|
+
annualFee: ${product.fee.annualFee},
|
|
148
|
+
basicAPR: ${product.fee.taeg},
|
|
149
|
+
basic: ${product.fee.tan}
|
|
150
|
+
`,
|
|
151
|
+
category: "credit-card",
|
|
152
|
+
list: category,
|
|
153
|
+
price: "5.00",
|
|
154
|
+
quantity: 1
|
|
155
|
+
}
|
|
156
|
+
];
|
|
133
157
|
default:
|
|
134
158
|
console.error(
|
|
135
159
|
`Unrecognized category ${category}, implement vertical specific gtm product`
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const applyProductData: (options: {
|
|
2
|
+
action: string;
|
|
2
3
|
journeyId: string | undefined;
|
|
3
4
|
index: number;
|
|
4
|
-
path: string;
|
|
5
5
|
productName: string;
|
|
6
6
|
productId: string;
|
|
7
7
|
providerId: string;
|
|
8
|
-
|
|
8
|
+
viewId: string;
|
|
9
|
+
category?: string;
|
|
10
|
+
}) => Promise<unknown>;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { useRuntimeConfig } from "#imports";
|
|
1
|
+
import { useRoute, useRuntimeConfig } from "#imports";
|
|
2
2
|
export const applyProductData = (options) => {
|
|
3
3
|
const { apiURL } = useRuntimeConfig().public;
|
|
4
|
-
|
|
4
|
+
const { path } = useRoute();
|
|
5
|
+
return $fetch("/core/apis/data/applyProductData", {
|
|
6
|
+
baseURL: apiURL,
|
|
5
7
|
method: "POST",
|
|
6
|
-
body:
|
|
7
|
-
|
|
8
|
+
body: {
|
|
9
|
+
path,
|
|
8
10
|
intent: "apply",
|
|
11
|
+
action: options.action || "OPEN_APPLICATION_FORM",
|
|
9
12
|
journeyId: options.journeyId,
|
|
10
|
-
path: options.path,
|
|
11
13
|
position: options.index,
|
|
12
14
|
offerSelected: options.productName,
|
|
13
15
|
cggId: options.productId,
|
|
14
16
|
providerCggId: options.providerId,
|
|
17
|
+
category: options.category,
|
|
18
|
+
viewId: options.viewId,
|
|
15
19
|
has_been_clicked: true
|
|
16
|
-
}
|
|
20
|
+
}
|
|
17
21
|
});
|
|
18
22
|
};
|