@blotoutio/providers-google-ads-clicks-sdk 1.33.0 → 1.34.0
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/index.cjs.js +32 -8
- package/index.js +32 -8
- package/index.mjs +32 -8
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -562,13 +562,37 @@ const getCartData = (variables, data) => {
|
|
|
562
562
|
if (!isNaN(merchantId)) {
|
|
563
563
|
cartData.aw_merchant_id = merchantId;
|
|
564
564
|
}
|
|
565
|
+
const aw_feed_country = data === null || data === void 0 ? void 0 : data['aw_feed_country'];
|
|
566
|
+
if (aw_feed_country) {
|
|
567
|
+
cartData.aw_feed_country = aw_feed_country;
|
|
568
|
+
}
|
|
569
|
+
const aw_feed_language = data === null || data === void 0 ? void 0 : data['aw_feed_language'];
|
|
570
|
+
if (aw_feed_language) {
|
|
571
|
+
cartData.aw_feed_language = aw_feed_language;
|
|
572
|
+
}
|
|
573
|
+
if (data === null || data === void 0 ? void 0 : data['discount']) {
|
|
574
|
+
const discount = parseFloat(data['discount']);
|
|
575
|
+
if (!isNaN(discount)) {
|
|
576
|
+
cartData.discount = discount;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
565
579
|
if (variables['identifierFormat'] && Array.isArray(data === null || data === void 0 ? void 0 : data['contents'])) {
|
|
566
580
|
cartData.items = data['contents'].map((content) => {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
581
|
+
const item = {};
|
|
582
|
+
const id = getIdentifierValue(variables['identifierFormat'], content);
|
|
583
|
+
if (id) {
|
|
584
|
+
item.id = id;
|
|
585
|
+
}
|
|
586
|
+
if (content.item_price) {
|
|
587
|
+
item.price = content.item_price;
|
|
588
|
+
}
|
|
589
|
+
if (content.quantity) {
|
|
590
|
+
item.quantity = content.quantity;
|
|
591
|
+
}
|
|
592
|
+
if (content['google_business_vertical']) {
|
|
593
|
+
item.google_business_vertical = content['google_business_vertical'];
|
|
594
|
+
}
|
|
595
|
+
return item;
|
|
572
596
|
});
|
|
573
597
|
}
|
|
574
598
|
return cartData;
|
|
@@ -616,14 +640,14 @@ const tag = ({ data, eventName, manifestVariables, destination, }) => {
|
|
|
616
640
|
!getCookieValue('_gcl_au')) {
|
|
617
641
|
return {
|
|
618
642
|
isFired: false,
|
|
619
|
-
sdkVersion: "1.
|
|
643
|
+
sdkVersion: "1.34.0" ,
|
|
620
644
|
};
|
|
621
645
|
}
|
|
622
646
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
623
647
|
if (!conversionLabel) {
|
|
624
648
|
return {
|
|
625
649
|
isFired: false,
|
|
626
|
-
sdkVersion: "1.
|
|
650
|
+
sdkVersion: "1.34.0" ,
|
|
627
651
|
};
|
|
628
652
|
}
|
|
629
653
|
if (manifestVariables['enhancedConversionsSetting'] === 'gtag' &&
|
|
@@ -640,7 +664,7 @@ const tag = ({ data, eventName, manifestVariables, destination, }) => {
|
|
|
640
664
|
});
|
|
641
665
|
return {
|
|
642
666
|
isFired: true,
|
|
643
|
-
sdkVersion: "1.
|
|
667
|
+
sdkVersion: "1.34.0" ,
|
|
644
668
|
};
|
|
645
669
|
};
|
|
646
670
|
|
package/index.js
CHANGED
|
@@ -563,13 +563,37 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
563
563
|
if (!isNaN(merchantId)) {
|
|
564
564
|
cartData.aw_merchant_id = merchantId;
|
|
565
565
|
}
|
|
566
|
+
const aw_feed_country = data === null || data === void 0 ? void 0 : data['aw_feed_country'];
|
|
567
|
+
if (aw_feed_country) {
|
|
568
|
+
cartData.aw_feed_country = aw_feed_country;
|
|
569
|
+
}
|
|
570
|
+
const aw_feed_language = data === null || data === void 0 ? void 0 : data['aw_feed_language'];
|
|
571
|
+
if (aw_feed_language) {
|
|
572
|
+
cartData.aw_feed_language = aw_feed_language;
|
|
573
|
+
}
|
|
574
|
+
if (data === null || data === void 0 ? void 0 : data['discount']) {
|
|
575
|
+
const discount = parseFloat(data['discount']);
|
|
576
|
+
if (!isNaN(discount)) {
|
|
577
|
+
cartData.discount = discount;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
566
580
|
if (variables['identifierFormat'] && Array.isArray(data === null || data === void 0 ? void 0 : data['contents'])) {
|
|
567
581
|
cartData.items = data['contents'].map((content) => {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
582
|
+
const item = {};
|
|
583
|
+
const id = getIdentifierValue(variables['identifierFormat'], content);
|
|
584
|
+
if (id) {
|
|
585
|
+
item.id = id;
|
|
586
|
+
}
|
|
587
|
+
if (content.item_price) {
|
|
588
|
+
item.price = content.item_price;
|
|
589
|
+
}
|
|
590
|
+
if (content.quantity) {
|
|
591
|
+
item.quantity = content.quantity;
|
|
592
|
+
}
|
|
593
|
+
if (content['google_business_vertical']) {
|
|
594
|
+
item.google_business_vertical = content['google_business_vertical'];
|
|
595
|
+
}
|
|
596
|
+
return item;
|
|
573
597
|
});
|
|
574
598
|
}
|
|
575
599
|
return cartData;
|
|
@@ -617,14 +641,14 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
617
641
|
!getCookieValue('_gcl_au')) {
|
|
618
642
|
return {
|
|
619
643
|
isFired: false,
|
|
620
|
-
sdkVersion: "1.
|
|
644
|
+
sdkVersion: "1.34.0" ,
|
|
621
645
|
};
|
|
622
646
|
}
|
|
623
647
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
624
648
|
if (!conversionLabel) {
|
|
625
649
|
return {
|
|
626
650
|
isFired: false,
|
|
627
|
-
sdkVersion: "1.
|
|
651
|
+
sdkVersion: "1.34.0" ,
|
|
628
652
|
};
|
|
629
653
|
}
|
|
630
654
|
if (manifestVariables['enhancedConversionsSetting'] === 'gtag' &&
|
|
@@ -641,7 +665,7 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
641
665
|
});
|
|
642
666
|
return {
|
|
643
667
|
isFired: true,
|
|
644
|
-
sdkVersion: "1.
|
|
668
|
+
sdkVersion: "1.34.0" ,
|
|
645
669
|
};
|
|
646
670
|
};
|
|
647
671
|
|
package/index.mjs
CHANGED
|
@@ -560,13 +560,37 @@ const getCartData = (variables, data) => {
|
|
|
560
560
|
if (!isNaN(merchantId)) {
|
|
561
561
|
cartData.aw_merchant_id = merchantId;
|
|
562
562
|
}
|
|
563
|
+
const aw_feed_country = data === null || data === void 0 ? void 0 : data['aw_feed_country'];
|
|
564
|
+
if (aw_feed_country) {
|
|
565
|
+
cartData.aw_feed_country = aw_feed_country;
|
|
566
|
+
}
|
|
567
|
+
const aw_feed_language = data === null || data === void 0 ? void 0 : data['aw_feed_language'];
|
|
568
|
+
if (aw_feed_language) {
|
|
569
|
+
cartData.aw_feed_language = aw_feed_language;
|
|
570
|
+
}
|
|
571
|
+
if (data === null || data === void 0 ? void 0 : data['discount']) {
|
|
572
|
+
const discount = parseFloat(data['discount']);
|
|
573
|
+
if (!isNaN(discount)) {
|
|
574
|
+
cartData.discount = discount;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
563
577
|
if (variables['identifierFormat'] && Array.isArray(data === null || data === void 0 ? void 0 : data['contents'])) {
|
|
564
578
|
cartData.items = data['contents'].map((content) => {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}
|
|
579
|
+
const item = {};
|
|
580
|
+
const id = getIdentifierValue(variables['identifierFormat'], content);
|
|
581
|
+
if (id) {
|
|
582
|
+
item.id = id;
|
|
583
|
+
}
|
|
584
|
+
if (content.item_price) {
|
|
585
|
+
item.price = content.item_price;
|
|
586
|
+
}
|
|
587
|
+
if (content.quantity) {
|
|
588
|
+
item.quantity = content.quantity;
|
|
589
|
+
}
|
|
590
|
+
if (content['google_business_vertical']) {
|
|
591
|
+
item.google_business_vertical = content['google_business_vertical'];
|
|
592
|
+
}
|
|
593
|
+
return item;
|
|
570
594
|
});
|
|
571
595
|
}
|
|
572
596
|
return cartData;
|
|
@@ -614,14 +638,14 @@ const tag = ({ data, eventName, manifestVariables, destination, }) => {
|
|
|
614
638
|
!getCookieValue('_gcl_au')) {
|
|
615
639
|
return {
|
|
616
640
|
isFired: false,
|
|
617
|
-
sdkVersion: "1.
|
|
641
|
+
sdkVersion: "1.34.0" ,
|
|
618
642
|
};
|
|
619
643
|
}
|
|
620
644
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
621
645
|
if (!conversionLabel) {
|
|
622
646
|
return {
|
|
623
647
|
isFired: false,
|
|
624
|
-
sdkVersion: "1.
|
|
648
|
+
sdkVersion: "1.34.0" ,
|
|
625
649
|
};
|
|
626
650
|
}
|
|
627
651
|
if (manifestVariables['enhancedConversionsSetting'] === 'gtag' &&
|
|
@@ -638,7 +662,7 @@ const tag = ({ data, eventName, manifestVariables, destination, }) => {
|
|
|
638
662
|
});
|
|
639
663
|
return {
|
|
640
664
|
isFired: true,
|
|
641
|
-
sdkVersion: "1.
|
|
665
|
+
sdkVersion: "1.34.0" ,
|
|
642
666
|
};
|
|
643
667
|
};
|
|
644
668
|
|