@segment/action-destinations 3.106.0-alpha.0 → 3.106.0-alpha.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/dist/destinations/amplitude/index.js +1 -3
- package/dist/destinations/amplitude/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/custom/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +1 -34
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/search/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +0 -3
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -9
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +1 -2
- package/dist/destinations/google-enhanced-conversions/index.js +7 -14
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +1 -7
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/hubspot/customObject/generated-types.d.ts +6 -0
- package/dist/destinations/{amplitude/logEventV2 → hubspot/customObject}/generated-types.js +0 -0
- package/dist/destinations/hubspot/customObject/generated-types.js.map +1 -0
- package/dist/destinations/{google-enhanced-conversions/uploadCallConversion → hubspot/customObject}/index.d.ts +1 -1
- package/dist/destinations/hubspot/customObject/index.js +41 -0
- package/dist/destinations/hubspot/customObject/index.js.map +1 -0
- package/dist/destinations/hubspot/generated-types.d.ts +2 -0
- package/dist/destinations/{google-enhanced-conversions/uploadCallConversion → hubspot}/generated-types.js +0 -0
- package/dist/destinations/hubspot/generated-types.js.map +1 -0
- package/dist/destinations/hubspot/index.d.ts +4 -0
- package/dist/destinations/hubspot/index.js +46 -0
- package/dist/destinations/hubspot/index.js.map +1 -0
- package/dist/destinations/hubspot/testHelper.d.ts +7 -0
- package/dist/destinations/hubspot/testHelper.js +23 -0
- package/dist/destinations/hubspot/testHelper.js.map +1 -0
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/index.js +7 -9
- package/dist/destinations/linkedin-audiences/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +10 -19
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/index.js +1 -12
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +0 -3
- package/dist/destinations/salesforce/sf-operations.js +0 -42
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.js +1 -2
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/package.json +4 -5
- package/dist/destinations/amplitude/emptyObject.d.ts +0 -2
- package/dist/destinations/amplitude/emptyObject.js +0 -7
- package/dist/destinations/amplitude/emptyObject.js.map +0 -1
- package/dist/destinations/amplitude/logEventV2/generated-types.d.ts +0 -77
- package/dist/destinations/amplitude/logEventV2/generated-types.js.map +0 -1
- package/dist/destinations/amplitude/logEventV2/index.d.ts +0 -13
- package/dist/destinations/amplitude/logEventV2/index.js +0 -237
- package/dist/destinations/amplitude/logEventV2/index.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +0 -6
- package/dist/destinations/google-enhanced-conversions/functions.js +0 -55
- package/dist/destinations/google-enhanced-conversions/functions.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/types.d.ts +0 -23
- package/dist/destinations/google-enhanced-conversions/types.js +0 -5
- package/dist/destinations/google-enhanced-conversions/types.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +0 -11
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +0 -92
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +0 -25
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js +0 -3
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.d.ts +0 -5
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +0 -229
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.d.ts +0 -20
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js +0 -3
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.d.ts +0 -5
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +0 -286
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +0 -1
|
@@ -10,7 +10,6 @@ const mapUser_1 = __importDefault(require("./mapUser"));
|
|
|
10
10
|
const groupIdentifyUser_1 = __importDefault(require("./groupIdentifyUser"));
|
|
11
11
|
const logPurchase_1 = __importDefault(require("./logPurchase"));
|
|
12
12
|
const regional_endpoints_1 = require("./regional-endpoints");
|
|
13
|
-
const logEventV2_1 = __importDefault(require("./logEventV2"));
|
|
14
13
|
const presets = [
|
|
15
14
|
{
|
|
16
15
|
name: 'Track Calls',
|
|
@@ -121,8 +120,7 @@ const destination = {
|
|
|
121
120
|
identifyUser: identifyUser_1.default,
|
|
122
121
|
mapUser: mapUser_1.default,
|
|
123
122
|
groupIdentifyUser: groupIdentifyUser_1.default,
|
|
124
|
-
logPurchase: logPurchase_1.default
|
|
125
|
-
logEventV2: logEventV2_1.default
|
|
123
|
+
logPurchase: logPurchase_1.default
|
|
126
124
|
}
|
|
127
125
|
};
|
|
128
126
|
exports.default = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amplitude/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,kEAAyC;AACzC,0DAAiC;AACjC,wDAA+B;AAC/B,4EAAmD;AACnD,gEAAuC;AAEvC,6DAA0D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amplitude/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,kEAAyC;AACzC,0DAAiC;AACjC,wDAA+B;AAC/B,4EAAmD;AACnD,gEAAuC;AAEvC,6DAA0D;AAG1D,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,+CA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iBAAO;QACP,iBAAiB,EAAjB,2BAAiB;QACjB,WAAW,EAAX,qBAAW;KACZ;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -39,10 +39,7 @@ const action = {
|
|
|
39
39
|
event_id: fb_capi_properties_1.event_id,
|
|
40
40
|
event_source_url: fb_capi_properties_1.event_source_url,
|
|
41
41
|
value: { ...fb_capi_properties_1.value, default: { '@path': '$.properties.price' } },
|
|
42
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
43
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
44
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
45
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
42
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
46
43
|
},
|
|
47
44
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
48
45
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
@@ -59,7 +56,6 @@ const action = {
|
|
|
59
56
|
if (err)
|
|
60
57
|
throw err;
|
|
61
58
|
}
|
|
62
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
63
59
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
64
60
|
method: 'POST',
|
|
65
61
|
json: {
|
|
@@ -79,10 +75,7 @@ const action = {
|
|
|
79
75
|
content_name: payload.content_name,
|
|
80
76
|
contents: payload.contents,
|
|
81
77
|
content_type: payload.content_type
|
|
82
|
-
}
|
|
83
|
-
data_processing_options: data_options,
|
|
84
|
-
data_processing_options_country: country_code,
|
|
85
|
-
data_processing_options_state: state_code
|
|
78
|
+
}
|
|
86
79
|
}
|
|
87
80
|
]
|
|
88
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,8DAa8B;AAC9B,4CAAiD;AACjD,4DAAsE;AACtE,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4DAA4D;IACzE,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,WAAW,EAAE,gCAAW;QACxB,YAAY,EAAE,iCAAY;QAC1B,YAAY,EAAE,iCAAY;QAC1B,QAAQ,EAAE;YACR,GAAG,6BAAQ;YACX,OAAO,EAAE;gBAEP,YAAY,EAAE;oBACZ,cAAc;oBACd;wBACE,EAAE,EAAE;4BACF,OAAO,EAAE,cAAc;yBACxB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,YAAY;yBACtB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,SAAS;yBACnB;qBACF;iBACF;aACF;SACF;QACD,QAAQ,EAAE,6BAAQ;QAClB,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;QAClC,KAAK,EAAE,EAAE,GAAG,0BAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE;QAC/D,WAAW,EAAE,gCAAW;KACzB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;QAClE,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CA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ChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,YAAY,EAAE,OAAO,CAAC,YAAY;yBACnC;qBACF;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -22,16 +22,12 @@ const action = {
|
|
|
22
22
|
user_data: fb_capi_user_data_1.user_data_field,
|
|
23
23
|
custom_data: fb_capi_properties_1.custom_data,
|
|
24
24
|
event_id: fb_capi_properties_1.event_id,
|
|
25
|
-
event_source_url: fb_capi_properties_1.event_source_url
|
|
26
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
27
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
28
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
25
|
+
event_source_url: fb_capi_properties_1.event_source_url
|
|
29
26
|
},
|
|
30
27
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
31
28
|
if (!payload.user_data) {
|
|
32
29
|
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
33
30
|
}
|
|
34
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
35
31
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
36
32
|
method: 'POST',
|
|
37
33
|
json: {
|
|
@@ -43,10 +39,7 @@ const action = {
|
|
|
43
39
|
event_id: payload.event_id,
|
|
44
40
|
event_source_url: payload.event_source_url,
|
|
45
41
|
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
46
|
-
custom_data: payload.custom_data
|
|
47
|
-
data_processing_options: data_options,
|
|
48
|
-
data_processing_options_country: country_code,
|
|
49
|
-
data_processing_options_state: state_code
|
|
42
|
+
custom_data: payload.custom_data
|
|
50
43
|
}
|
|
51
44
|
]
|
|
52
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA0G;AAC1G,4DAAsE;AAGtE,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,2PAA2P;YAC7P,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,WAAW,EAAE,gCAAW;QACxB,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;QAClE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACtB,MAAM,IAAI,+BAAgB,CAAC,8CAA8C,EAAE,8BAA8B,EAAE,GAAG,CAAC,CAAA;SAChH;QAED,OAAO,OAAO,CACZ,+BAA+B,uBAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;wBAC3D,WAAW,EAAE,OAAO,CAAC,WAAW;qBACjC;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -12,12 +12,7 @@ export declare const content_ids: InputField;
|
|
|
12
12
|
export declare const content_name: InputField;
|
|
13
13
|
export declare const content_type: InputField;
|
|
14
14
|
export declare const contents: InputField;
|
|
15
|
-
export declare const data_processing_options: InputField;
|
|
16
|
-
export declare const data_processing_options_country: InputField;
|
|
17
|
-
export declare const data_processing_options_state: InputField;
|
|
18
15
|
export declare const validateContents: (contents: Content[]) => IntegrationError | false;
|
|
19
|
-
declare type DPOption = string[] | number;
|
|
20
|
-
export declare const dataProcessingOptions: (data_processing_options: boolean | undefined, countryOption: number | undefined, stateOption: number | undefined) => DPOption[];
|
|
21
16
|
export declare const num_items: InputField;
|
|
22
17
|
export declare const event_time: InputField;
|
|
23
18
|
export declare const action_source: InputField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.event_id = exports.event_source_url = exports.action_source = exports.event_time = exports.num_items = exports.
|
|
3
|
+
exports.event_id = exports.event_source_url = exports.action_source = exports.event_time = exports.num_items = exports.validateContents = exports.contents = exports.content_type = exports.content_name = exports.content_ids = exports.content_category = exports.value = exports.currency = exports.custom_data = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
exports.custom_data = {
|
|
6
6
|
label: 'Custom Data',
|
|
@@ -70,29 +70,6 @@ exports.contents = {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
exports.data_processing_options = {
|
|
74
|
-
label: 'Data Processing Options',
|
|
75
|
-
description: `The Data Processing Options to send to Facebook. If set to true, Segment will send an array to Facebook indicating events should be processed with Limited Data Use (LDU) restrictions. More information can be found in [Facebook’s documentation](https://developers.facebook.com/docs/marketing-apis/data-processing-options).`,
|
|
76
|
-
type: 'boolean'
|
|
77
|
-
};
|
|
78
|
-
exports.data_processing_options_country = {
|
|
79
|
-
label: 'Data Processing Country',
|
|
80
|
-
description: 'A country that you want to associate to the Data Processing Options. Accepted values are 1, for the United States of America, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
|
|
81
|
-
type: 'number',
|
|
82
|
-
choices: [
|
|
83
|
-
{ label: 'Use Facebook’s Geolocation Logic', value: 0 },
|
|
84
|
-
{ label: 'United States of America', value: 1 }
|
|
85
|
-
]
|
|
86
|
-
};
|
|
87
|
-
exports.data_processing_options_state = {
|
|
88
|
-
label: 'Data Processing State',
|
|
89
|
-
description: 'A state that you want to associate to the Data Processing Options. Accepted values are 1000, for California, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
|
|
90
|
-
type: 'number',
|
|
91
|
-
choices: [
|
|
92
|
-
{ label: 'Use Facebook’s Geolocation Logic', value: 0 },
|
|
93
|
-
{ label: 'California', value: 1000 }
|
|
94
|
-
]
|
|
95
|
-
};
|
|
96
73
|
const validateContents = (contents) => {
|
|
97
74
|
const valid_delivery_categories = ['in_store', 'curbside', 'home_delivery'];
|
|
98
75
|
for (let i = 0; i < contents.length; i++) {
|
|
@@ -107,16 +84,6 @@ const validateContents = (contents) => {
|
|
|
107
84
|
return false;
|
|
108
85
|
};
|
|
109
86
|
exports.validateContents = validateContents;
|
|
110
|
-
const dataProcessingOptions = (data_processing_options, countryOption, stateOption) => {
|
|
111
|
-
if (data_processing_options) {
|
|
112
|
-
const data_options = ['LDU'];
|
|
113
|
-
const country_code = countryOption ? countryOption : 0;
|
|
114
|
-
const state_code = stateOption ? stateOption : 0;
|
|
115
|
-
return [data_options, country_code, state_code];
|
|
116
|
-
}
|
|
117
|
-
return [];
|
|
118
|
-
};
|
|
119
|
-
exports.dataProcessingOptions = dataProcessingOptions;
|
|
120
87
|
exports.num_items = {
|
|
121
88
|
label: 'Number of Items',
|
|
122
89
|
description: 'The number of items when checkout was initiated.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fb-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/facebook-conversions-api/fb-capi-properties.ts"],"names":[],"mappings":";;;AACA,wDAAwD;AAW3C,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,+NAA+N;IACjO,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,UAAU;CAC5B,CAAA;AAEY,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,oGAAoG;IACjH,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,uBAAuB;KACjC;CACF,CAAA;AAEY,QAAA,KAAK,GAAe;IAC/B,KAAK,EAAE,OAAO;IACd,WAAW,
|
|
1
|
+
{"version":3,"file":"fb-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/facebook-conversions-api/fb-capi-properties.ts"],"names":[],"mappings":";;;AACA,wDAAwD;AAW3C,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,+NAA+N;IACjO,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,UAAU;CAC5B,CAAA;AAEY,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,oGAAoG;IACjH,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,E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B,WAAW,EACT,2HAA2H;IAC7H,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,aAAa;KACvB;CACF,CAAA"}
|
|
@@ -42,10 +42,7 @@ const action = {
|
|
|
42
42
|
...fb_capi_properties_1.value,
|
|
43
43
|
default: { '@path': '$.properties.revenue' }
|
|
44
44
|
},
|
|
45
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
46
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
47
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
48
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
45
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
49
46
|
},
|
|
50
47
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
51
48
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
@@ -62,7 +59,6 @@ const action = {
|
|
|
62
59
|
if (err)
|
|
63
60
|
throw err;
|
|
64
61
|
}
|
|
65
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
66
62
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
67
63
|
method: 'POST',
|
|
68
64
|
json: {
|
|
@@ -82,10 +78,7 @@ const action = {
|
|
|
82
78
|
contents: payload.contents,
|
|
83
79
|
num_items: payload.num_items,
|
|
84
80
|
content_category: payload.content_category
|
|
85
|
-
}
|
|
86
|
-
data_processing_options: data_options,
|
|
87
|
-
data_processing_options_country: country_code,
|
|
88
|
-
data_processing_options_state: state_code
|
|
81
|
+
}
|
|
89
82
|
}
|
|
90
83
|
]
|
|
91
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/initiateCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/initiateCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,8DAa8B;AAC9B,4DAAsE;AACtE,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,iDAAiD;IAC9D,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,gCAAW;QACxB,QAAQ,EAAE;YAER,GAAG,6BAAQ;YACX,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,uBAAuB;oBACvB;wBACE,EAAE,EAAE;4BACF,OAAO,EAAE,cAAc;yBACxB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,YAAY;yBACtB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,SAAS;yBACnB;qBACF;iBACF;aACF;SACF;QACD,QAAQ,EAAE,6BAAQ;QAClB,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;QAClC,SAAS,EAAE,8BAAS;QACpB,KAAK,EAAE;YACL,GAAG,0BAAK;YACR,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,WAAW,EAAE,gCAAW;KACzB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;QAClE,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,GAAG,CAAC,OAAO,CA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O,CAAC,QAAQ;4BAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;4BAC5B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;yBAC3C;qBACF;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -14,10 +14,7 @@ const action = {
|
|
|
14
14
|
user_data: fb_capi_user_data_1.user_data_field,
|
|
15
15
|
event_id: fb_capi_properties_1.event_id,
|
|
16
16
|
event_source_url: fb_capi_properties_1.event_source_url,
|
|
17
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
18
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
19
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
20
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
17
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
21
18
|
},
|
|
22
19
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
23
20
|
if (!payload.user_data) {
|
|
@@ -26,7 +23,6 @@ const action = {
|
|
|
26
23
|
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
27
24
|
throw new actions_core_1.IntegrationError('If action source is "Website" then client_user_agent must be defined', 'Misconfigured required field', 400);
|
|
28
25
|
}
|
|
29
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
30
26
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
31
27
|
method: 'POST',
|
|
32
28
|
json: {
|
|
@@ -37,10 +33,7 @@ const action = {
|
|
|
37
33
|
action_source: payload.action_source,
|
|
38
34
|
event_source_url: payload.event_source_url,
|
|
39
35
|
event_id: payload.event_id,
|
|
40
|
-
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data })
|
|
41
|
-
data_processing_options: data_options,
|
|
42
|
-
data_processing_options_country: country_code,
|
|
43
|
-
data_processing_options_state: state_code
|
|
36
|
+
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data })
|
|
44
37
|
}
|
|
45
38
|
]
|
|
46
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/pageView/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/pageView/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA0G;AAC1G,4DAAsE;AAGtE,oCAA0C;AAC1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,gCAAW;KACzB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;QAClE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACtB,MAAM,IAAI,+BAAgB,CAAC,8CAA8C,EAAE,8BAA8B,EAAE,GAAG,CAAC,CAAA;SAChH;QAED,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,SAAS,EAAE;YAC5F,MAAM,IAAI,+BAAgB,CACxB,sEAAsE,EACtE,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QACD,OAAO,OAAO,CACZ,+BAA+B,uBAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,UAAU,EAAE,UAAU;wBACtB,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;qBAC5D;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -44,10 +44,7 @@ const action = {
|
|
|
44
44
|
event_id: fb_capi_properties_1.event_id,
|
|
45
45
|
event_source_url: fb_capi_properties_1.event_source_url,
|
|
46
46
|
num_items: fb_capi_properties_1.num_items,
|
|
47
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
48
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
49
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
50
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
47
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
51
48
|
},
|
|
52
49
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
53
50
|
if (!constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
@@ -64,7 +61,6 @@ const action = {
|
|
|
64
61
|
if (err)
|
|
65
62
|
throw err;
|
|
66
63
|
}
|
|
67
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
68
64
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
69
65
|
method: 'POST',
|
|
70
66
|
json: {
|
|
@@ -85,10 +81,7 @@ const action = {
|
|
|
85
81
|
content_type: payload.content_type,
|
|
86
82
|
contents: payload.contents,
|
|
87
83
|
num_items: payload.num_items
|
|
88
|
-
}
|
|
89
|
-
data_processing_options: data_options,
|
|
90
|
-
data_processing_options_country: country_code,
|
|
91
|
-
data_processing_options_state: state_code
|
|
84
|
+
}
|
|
92
85
|
}
|
|
93
86
|
]
|
|
94
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,oCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,oCAA0C;AAC1C,8DAc8B;AAC9B,4DAAsE;AAEtE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,KAAK,EAAE;YACL,GAAG,0BAAK;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,WAAW,EAAE,gCAAW;QACxB,YAAY,EAAE,iCAAY;QAC1B,YAAY,EAAE,iCAAY;QAC1B,QAAQ,EAAE;YAER,GAAG,6BAAQ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ACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,UAAU,EAAE,UAAU;wBACtB,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;wBAC3D,WAAW,EAAE;4BACX,GAAG,OAAO,CAAC,WAAW;4BACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;yBAC7B;qBACF;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -46,10 +46,7 @@ const action = {
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
value: fb_capi_properties_1.value,
|
|
49
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
50
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
51
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
52
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
49
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
53
50
|
},
|
|
54
51
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
55
52
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
@@ -66,7 +63,6 @@ const action = {
|
|
|
66
63
|
if (err)
|
|
67
64
|
throw err;
|
|
68
65
|
}
|
|
69
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
70
66
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
71
67
|
method: 'POST',
|
|
72
68
|
json: {
|
|
@@ -86,10 +82,7 @@ const action = {
|
|
|
86
82
|
content_category: payload.content_category,
|
|
87
83
|
value: payload.value,
|
|
88
84
|
search_string: payload.search_string
|
|
89
|
-
}
|
|
90
|
-
data_processing_options: data_options,
|
|
91
|
-
data_processing_options_country: country_code,
|
|
92
|
-
data_processing_options_state: state_code
|
|
85
|
+
}
|
|
93
86
|
}
|
|
94
87
|
]
|
|
95
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/search/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,oCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/search/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,oCAA0C;AAC1C,8DAY8B;AAC9B,4DAAsE;AAEtE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,qDAAqD;IAClE,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,gCAAW;QACxB,QAAQ,EAAE;YACR,GAAG,6BAAQ;YACX,OAAO,EAAE;gBAEP,YAAY,EAAE;oBACZ,cAAc;oBACd;wB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ACnB;QAED,OAAO,OAAO,CACZ,+BAA+B,uBAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,UAAU,EAAE,QAAQ;wBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;wBAC3D,WAAW,EAAE;4BACX,GAAG,OAAO,CAAC,WAAW;4BACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;4BAC1C,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,aAAa,EAAE,OAAO,CAAC,aAAa;yBACrC;qBACF;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -40,10 +40,7 @@ const action = {
|
|
|
40
40
|
event_id: fb_capi_properties_1.event_id,
|
|
41
41
|
event_source_url: fb_capi_properties_1.event_source_url,
|
|
42
42
|
value: { ...fb_capi_properties_1.value, default: { '@path': '$.properties.price' } },
|
|
43
|
-
custom_data: fb_capi_properties_1.custom_data
|
|
44
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
45
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
46
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
43
|
+
custom_data: fb_capi_properties_1.custom_data
|
|
47
44
|
},
|
|
48
45
|
perform: (request, { payload, settings, features, statsContext }) => {
|
|
49
46
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
@@ -60,7 +57,6 @@ const action = {
|
|
|
60
57
|
if (err)
|
|
61
58
|
throw err;
|
|
62
59
|
}
|
|
63
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
64
60
|
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
65
61
|
method: 'POST',
|
|
66
62
|
json: {
|
|
@@ -80,10 +76,7 @@ const action = {
|
|
|
80
76
|
content_name: payload.content_name,
|
|
81
77
|
content_type: payload.content_type,
|
|
82
78
|
contents: payload.contents
|
|
83
|
-
}
|
|
84
|
-
data_processing_options: data_options,
|
|
85
|
-
data_processing_options_country: country_code,
|
|
86
|
-
data_processing_options_state: state_code
|
|
79
|
+
}
|
|
87
80
|
}
|
|
88
81
|
]
|
|
89
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/viewContent/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/viewContent/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAc8B;AAC9B,4DAAsE;AAGtE,4CAAiD;AACjD,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,mDAAmD;IAChE,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mC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AsE,EACtE,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,MAAM,GAAG,GAAG,qCAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAC9C,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAA;SACnB;QAED,OAAO,OAAO,CACZ,+BAA+B,uBAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,UAAU,EAAE,aAAa;wBACzB,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;wBAC3D,WAAW,EAAE;4BACX,GAAG,OAAO,CAAC,WAAW;4BACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;yBAC3B;qBACF;iBACF;aACF;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -4,9 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const postConversion_1 = __importDefault(require("./postConversion"));
|
|
7
|
-
const uploadCallConversion_1 = __importDefault(require("./uploadCallConversion"));
|
|
8
|
-
const uploadClickConversion_1 = __importDefault(require("./uploadClickConversion"));
|
|
9
|
-
const uploadConversionAdjustment_1 = __importDefault(require("./uploadConversionAdjustment"));
|
|
10
7
|
const destination = {
|
|
11
8
|
name: 'Google Enhanced Conversions',
|
|
12
9
|
slug: 'actions-google-enhanced-conversions',
|
|
@@ -17,12 +14,8 @@ const destination = {
|
|
|
17
14
|
conversionTrackingId: {
|
|
18
15
|
label: 'Conversion ID',
|
|
19
16
|
description: 'You will find this information in the event snippet for your conversion action, for example `send_to: AW-CONVERSION_ID/AW-CONVERSION_LABEL`. In the sample snippet, AW-CONVERSION_ID stands for the conversion ID unique to your account. Enter the conversion Id, without the AW- prefix.',
|
|
20
|
-
type: 'string'
|
|
21
|
-
|
|
22
|
-
customerId: {
|
|
23
|
-
label: 'Customer ID',
|
|
24
|
-
description: 'ID of your Google Ads Account. This should be 10-digits and in XXX-XXX-XXXX format. **Required if you are using a mapping that sends data to the Google Ads API.**',
|
|
25
|
-
type: 'string'
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true
|
|
26
19
|
}
|
|
27
20
|
},
|
|
28
21
|
testAuthentication: async (_request) => {
|
|
@@ -41,18 +34,18 @@ const destination = {
|
|
|
41
34
|
return { accessToken: res.data.access_token };
|
|
42
35
|
}
|
|
43
36
|
},
|
|
44
|
-
extendRequest({ auth }) {
|
|
37
|
+
extendRequest({ settings, auth }) {
|
|
45
38
|
return {
|
|
46
39
|
headers: {
|
|
47
40
|
authorization: `Bearer ${auth?.accessToken}`
|
|
41
|
+
},
|
|
42
|
+
searchParams: {
|
|
43
|
+
conversion_tracking_id: settings.conversionTrackingId
|
|
48
44
|
}
|
|
49
45
|
};
|
|
50
46
|
},
|
|
51
47
|
actions: {
|
|
52
|
-
postConversion: postConversion_1.default
|
|
53
|
-
uploadClickConversion: uploadClickConversion_1.default,
|
|
54
|
-
uploadCallConversion: uploadCallConversion_1.default,
|
|
55
|
-
uploadConversionAdjustment: uploadConversionAdjustment_1.default
|
|
48
|
+
postConversion: postConversion_1.default
|
|
56
49
|
}
|
|
57
50
|
};
|
|
58
51
|
exports.default = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/google-enhanced-conversions/index.ts"],"names":[],"mappings":";;;;;AAEA,sEAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/google-enhanced-conversions/index.ts"],"names":[],"mappings":";;;;;AAEA,sEAA6C;AAe7C,MAAM,WAAW,GAAoC;IAGnD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,oBAAoB,EAAE;gBACpB,KAAK,EAAE,eAAe;gBACtB,WAAW,EACT,4RAA4R;gBAC9R,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;YAQrC,OAAO,IAAI,CAAA;QACb,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,4CAA4C,EAAE;gBAC5F,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;YACD,YAAY,EAAE;gBACZ,sBAAsB,EAAE,QAAQ,CAAC,oBAAoB;aACtD;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;KACf;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -178,10 +178,7 @@ const action = {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
|
-
perform: async (request, { payload
|
|
182
|
-
if (!settings.conversionTrackingId) {
|
|
183
|
-
throw new actions_core_1.IntegrationError('Conversion ID is required for this action. Please set it in destination settings.', 'Missing required fields.', 400);
|
|
184
|
-
}
|
|
181
|
+
perform: async (request, { payload }) => {
|
|
185
182
|
const conversionData = formatter_1.cleanData({
|
|
186
183
|
oid: payload.transaction_id,
|
|
187
184
|
user_agent: payload.user_agent,
|
|
@@ -211,9 +208,6 @@ const action = {
|
|
|
211
208
|
try {
|
|
212
209
|
return await request('https://www.google.com/ads/event/api/v1', {
|
|
213
210
|
method: 'post',
|
|
214
|
-
searchParams: {
|
|
215
|
-
conversion_tracking_id: settings.conversionTrackingId
|
|
216
|
-
},
|
|
217
211
|
json: {
|
|
218
212
|
pii_data: { ...pii_data, address: [address] },
|
|
219
213
|
...conversionData
|