@blotoutio/providers-google-ads-clicks-sdk 1.70.0 → 1.70.1
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 +28 -3
- package/index.js +28 -3
- package/index.mjs +28 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -1012,7 +1012,7 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1012
1012
|
var _a, _b;
|
|
1013
1013
|
const result = {
|
|
1014
1014
|
isFired: false,
|
|
1015
|
-
sdkVersion: "1.70.
|
|
1015
|
+
sdkVersion: "1.70.1" ,
|
|
1016
1016
|
};
|
|
1017
1017
|
const tagId = manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['tagId'];
|
|
1018
1018
|
if (!eventName || !window.gtag || !tagId) {
|
|
@@ -1020,7 +1020,18 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1020
1020
|
}
|
|
1021
1021
|
const shouldLoadSDK = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1' ||
|
|
1022
1022
|
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['dynamicRemarketingEnabled']) === '1';
|
|
1023
|
-
|
|
1023
|
+
const isDataManager = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['apiVersion']) === '2';
|
|
1024
|
+
/*
|
|
1025
|
+
* v1 has to know gtag.js actually loaded. Google does no cross-source dedup
|
|
1026
|
+
* there, so the hybrid flow sends each conversion from one side only: the edge
|
|
1027
|
+
* skips its server conversion whenever isFired is true, and a queued event that
|
|
1028
|
+
* never flushed would be lost on both paths. v2 removes that reason — both
|
|
1029
|
+
* sides always send and Google dedups on transactionId — so we hand the event
|
|
1030
|
+
* to the gtag queue and let it flush whenever gtag.js arrives, rather than
|
|
1031
|
+
* dropping every conversion that lands while the script is still in flight.
|
|
1032
|
+
*/
|
|
1033
|
+
if (!shouldLoadSDK ||
|
|
1034
|
+
(!isDataManager && !((_a = window.google_tag_manager) === null || _a === void 0 ? void 0 : _a[tagId]))) {
|
|
1024
1035
|
return result;
|
|
1025
1036
|
}
|
|
1026
1037
|
const resolvedPageUrl = pageUrl || ((_b = window.location) === null || _b === void 0 ? void 0 : _b.href);
|
|
@@ -1028,9 +1039,23 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1028
1039
|
sendDynamicRemarketingEvent(eventName, manifestVariables, data, resolvedPageUrl);
|
|
1029
1040
|
// Fire conversion event if loadSDK is enabled and conversion label exists
|
|
1030
1041
|
if ((manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1') {
|
|
1042
|
+
/*
|
|
1043
|
+
* No label means the row is mapped to an import-for-clicks conversion
|
|
1044
|
+
* action, which has no tag snippet and so nothing for gtag to send to. Those
|
|
1045
|
+
* rows are server-only by design (they are how a v1 server-only mapping
|
|
1046
|
+
* migrates to v2), so skip the browser conversion and leave the upload to
|
|
1047
|
+
* the edge. Dynamic remarketing above is keyed to the tag id, not a label,
|
|
1048
|
+
* and still fires.
|
|
1049
|
+
*/
|
|
1031
1050
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
1032
1051
|
if (conversionLabel) {
|
|
1033
|
-
|
|
1052
|
+
/*
|
|
1053
|
+
* On v2 the browser is the primary source of user data: Google now accepts
|
|
1054
|
+
* user-provided data from the tag, Data Manager and the API at once, so
|
|
1055
|
+
* there is no adjustment upload to attach it server-side. Consent is
|
|
1056
|
+
* handled by Consent Mode — `init` sets ad_user_data/ad_personalization
|
|
1057
|
+
* from the user's consent, and gtag withholds user data when they're denied.
|
|
1058
|
+
*/
|
|
1034
1059
|
// On unless a super admin turns it off for the channel — setting user data
|
|
1035
1060
|
// here appears to cost the account's v1 conversion actions their enhanced
|
|
1036
1061
|
// conversions coverage. v1 keeps following the customer's own EC setting.
|
package/index.js
CHANGED
|
@@ -1013,7 +1013,7 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
1013
1013
|
var _a, _b;
|
|
1014
1014
|
const result = {
|
|
1015
1015
|
isFired: false,
|
|
1016
|
-
sdkVersion: "1.70.
|
|
1016
|
+
sdkVersion: "1.70.1" ,
|
|
1017
1017
|
};
|
|
1018
1018
|
const tagId = manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['tagId'];
|
|
1019
1019
|
if (!eventName || !window.gtag || !tagId) {
|
|
@@ -1021,7 +1021,18 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
const shouldLoadSDK = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1' ||
|
|
1023
1023
|
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['dynamicRemarketingEnabled']) === '1';
|
|
1024
|
-
|
|
1024
|
+
const isDataManager = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['apiVersion']) === '2';
|
|
1025
|
+
/*
|
|
1026
|
+
* v1 has to know gtag.js actually loaded. Google does no cross-source dedup
|
|
1027
|
+
* there, so the hybrid flow sends each conversion from one side only: the edge
|
|
1028
|
+
* skips its server conversion whenever isFired is true, and a queued event that
|
|
1029
|
+
* never flushed would be lost on both paths. v2 removes that reason — both
|
|
1030
|
+
* sides always send and Google dedups on transactionId — so we hand the event
|
|
1031
|
+
* to the gtag queue and let it flush whenever gtag.js arrives, rather than
|
|
1032
|
+
* dropping every conversion that lands while the script is still in flight.
|
|
1033
|
+
*/
|
|
1034
|
+
if (!shouldLoadSDK ||
|
|
1035
|
+
(!isDataManager && !((_a = window.google_tag_manager) === null || _a === void 0 ? void 0 : _a[tagId]))) {
|
|
1025
1036
|
return result;
|
|
1026
1037
|
}
|
|
1027
1038
|
const resolvedPageUrl = pageUrl || ((_b = window.location) === null || _b === void 0 ? void 0 : _b.href);
|
|
@@ -1029,9 +1040,23 @@ var ProvidersGoogleAdsClicksSdk = (function () {
|
|
|
1029
1040
|
sendDynamicRemarketingEvent(eventName, manifestVariables, data, resolvedPageUrl);
|
|
1030
1041
|
// Fire conversion event if loadSDK is enabled and conversion label exists
|
|
1031
1042
|
if ((manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1') {
|
|
1043
|
+
/*
|
|
1044
|
+
* No label means the row is mapped to an import-for-clicks conversion
|
|
1045
|
+
* action, which has no tag snippet and so nothing for gtag to send to. Those
|
|
1046
|
+
* rows are server-only by design (they are how a v1 server-only mapping
|
|
1047
|
+
* migrates to v2), so skip the browser conversion and leave the upload to
|
|
1048
|
+
* the edge. Dynamic remarketing above is keyed to the tag id, not a label,
|
|
1049
|
+
* and still fires.
|
|
1050
|
+
*/
|
|
1032
1051
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
1033
1052
|
if (conversionLabel) {
|
|
1034
|
-
|
|
1053
|
+
/*
|
|
1054
|
+
* On v2 the browser is the primary source of user data: Google now accepts
|
|
1055
|
+
* user-provided data from the tag, Data Manager and the API at once, so
|
|
1056
|
+
* there is no adjustment upload to attach it server-side. Consent is
|
|
1057
|
+
* handled by Consent Mode — `init` sets ad_user_data/ad_personalization
|
|
1058
|
+
* from the user's consent, and gtag withholds user data when they're denied.
|
|
1059
|
+
*/
|
|
1035
1060
|
// On unless a super admin turns it off for the channel — setting user data
|
|
1036
1061
|
// here appears to cost the account's v1 conversion actions their enhanced
|
|
1037
1062
|
// conversions coverage. v1 keeps following the customer's own EC setting.
|
package/index.mjs
CHANGED
|
@@ -1010,7 +1010,7 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1010
1010
|
var _a, _b;
|
|
1011
1011
|
const result = {
|
|
1012
1012
|
isFired: false,
|
|
1013
|
-
sdkVersion: "1.70.
|
|
1013
|
+
sdkVersion: "1.70.1" ,
|
|
1014
1014
|
};
|
|
1015
1015
|
const tagId = manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['tagId'];
|
|
1016
1016
|
if (!eventName || !window.gtag || !tagId) {
|
|
@@ -1018,7 +1018,18 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1018
1018
|
}
|
|
1019
1019
|
const shouldLoadSDK = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1' ||
|
|
1020
1020
|
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['dynamicRemarketingEnabled']) === '1';
|
|
1021
|
-
|
|
1021
|
+
const isDataManager = (manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['apiVersion']) === '2';
|
|
1022
|
+
/*
|
|
1023
|
+
* v1 has to know gtag.js actually loaded. Google does no cross-source dedup
|
|
1024
|
+
* there, so the hybrid flow sends each conversion from one side only: the edge
|
|
1025
|
+
* skips its server conversion whenever isFired is true, and a queued event that
|
|
1026
|
+
* never flushed would be lost on both paths. v2 removes that reason — both
|
|
1027
|
+
* sides always send and Google dedups on transactionId — so we hand the event
|
|
1028
|
+
* to the gtag queue and let it flush whenever gtag.js arrives, rather than
|
|
1029
|
+
* dropping every conversion that lands while the script is still in flight.
|
|
1030
|
+
*/
|
|
1031
|
+
if (!shouldLoadSDK ||
|
|
1032
|
+
(!isDataManager && !((_a = window.google_tag_manager) === null || _a === void 0 ? void 0 : _a[tagId]))) {
|
|
1022
1033
|
return result;
|
|
1023
1034
|
}
|
|
1024
1035
|
const resolvedPageUrl = pageUrl || ((_b = window.location) === null || _b === void 0 ? void 0 : _b.href);
|
|
@@ -1026,9 +1037,23 @@ const tag = ({ data, eventName, eventId, manifestVariables, destination, pageUrl
|
|
|
1026
1037
|
sendDynamicRemarketingEvent(eventName, manifestVariables, data, resolvedPageUrl);
|
|
1027
1038
|
// Fire conversion event if loadSDK is enabled and conversion label exists
|
|
1028
1039
|
if ((manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['loadSDK']) === '1') {
|
|
1040
|
+
/*
|
|
1041
|
+
* No label means the row is mapped to an import-for-clicks conversion
|
|
1042
|
+
* action, which has no tag snippet and so nothing for gtag to send to. Those
|
|
1043
|
+
* rows are server-only by design (they are how a v1 server-only mapping
|
|
1044
|
+
* migrates to v2), so skip the browser conversion and leave the upload to
|
|
1045
|
+
* the edge. Dynamic remarketing above is keyed to the tag id, not a label,
|
|
1046
|
+
* and still fires.
|
|
1047
|
+
*/
|
|
1029
1048
|
const conversionLabel = getConversionLabel(eventName, manifestVariables);
|
|
1030
1049
|
if (conversionLabel) {
|
|
1031
|
-
|
|
1050
|
+
/*
|
|
1051
|
+
* On v2 the browser is the primary source of user data: Google now accepts
|
|
1052
|
+
* user-provided data from the tag, Data Manager and the API at once, so
|
|
1053
|
+
* there is no adjustment upload to attach it server-side. Consent is
|
|
1054
|
+
* handled by Consent Mode — `init` sets ad_user_data/ad_personalization
|
|
1055
|
+
* from the user's consent, and gtag withholds user data when they're denied.
|
|
1056
|
+
*/
|
|
1032
1057
|
// On unless a super admin turns it off for the channel — setting user data
|
|
1033
1058
|
// here appears to cost the account's v1 conversion actions their enhanced
|
|
1034
1059
|
// conversions coverage. v1 keeps following the customer's own EC setting.
|