diff --git a/CHANGELOG.md b/CHANGELOG.md index a81c5b5fee..e4d972f67c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.82.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.82.1...v1.82.2) (2024-10-18) + + +### Bug Fixes + +* add missing fields to pinterest_tag mapping ([#3814](https://github.com/rudderlabs/rudder-transformer/issues/3814)) ([88c6175](https://github.com/rudderlabs/rudder-transformer/commit/88c6175391cf4575a57936aced898465ad78b55e)) + ### [1.82.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.82.0...v1.82.1) (2024-10-16) diff --git a/package-lock.json b/package-lock.json index a4295bd74c..00b17114dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.82.1", + "version": "1.82.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.82.1", + "version": "1.82.2", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "0.7.24", diff --git a/package.json b/package.json index 6b41457633..e6a5259bb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.82.1", + "version": "1.82.2", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/cdk/v2/destinations/pinterest_tag/config.js b/src/cdk/v2/destinations/pinterest_tag/config.js new file mode 100644 index 0000000000..9e019e1436 --- /dev/null +++ b/src/cdk/v2/destinations/pinterest_tag/config.js @@ -0,0 +1,19 @@ +const ENDPOINT = 'https://ct.pinterest.com/events/v3'; +// ref: https://developers.pinterest.com/docs/api/v5/#tag/conversion_events +const getV5EventsEndpoint = (adAccountId) => + `https://api.pinterest.com/v5/ad_accounts/${adAccountId}/events`; + +const API_VERSION = { + v3: 'legacyApi', + v5: 'newApi', +}; + +// ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html +const MAX_BATCH_SIZE = 1000; + +module.exports = { + ENDPOINT, + MAX_BATCH_SIZE, + getV5EventsEndpoint, + API_VERSION, +}; diff --git a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml index 1122a80404..64d391c888 100644 --- a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml +++ b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml @@ -3,8 +3,8 @@ bindings: path: ../../../../constants - path: ../../bindings/jsontemplate exportAll: true - - path: ../../../../v0/destinations/pinterest_tag/utils - - path: ../../../../v0/destinations/pinterest_tag/config + - path: ./utils + - path: ./config - name: removeUndefinedValues path: ../../../../v0/util - name: removeUndefinedAndNullAndEmptyValues @@ -66,7 +66,10 @@ steps: "opt_out": .context.device.adTrackingEnabled !== undefined ? !.context.device.adTrackingEnabled, "event_id": $.getOneByPaths(., ^.destination.Config.deduplicationKey) ?? .messageId, "app_id": ^.destination.Config.appId, - "advertiser_id": ^.destination.Config.advertiserId + "advertiser_id": ^.destination.Config.advertiserId, + "partner_name": .properties.partnerName, + "device_carrier": .context.network.carrier, + "wifi": .context.network.wifi }); $.outputs.apiVersion === {{$.API_VERSION.v5}} ? commonFields = commonFields{~["advertiser_id"]}; $.removeUndefinedValues(commonFields) @@ -103,7 +106,8 @@ steps: "client_ip_address": .context.ip ?? .request_ip, "client_user_agent": .context.userAgent, "external_id": {{{{$.getGenericPaths("userId")}}}}, - "click_id": .properties.clickId + "click_id": .properties.clickId, + "partner_id": .traits.partnerId ?? .context.traits.partnerId }); !.destination.Config.sendExternalId ? userFields = userFields{~["external_id"]} : null; userFields = $.removeUndefinedAndNullAndEmptyValues(userFields); @@ -129,7 +133,11 @@ steps: "num_items": .properties.numOfItems && Number(.properties.numOfItems), "order_id": .properties.order_id, "search_string": .properties.query, - "opt_out_type": .properties.optOutType + "opt_out_type": .properties.optOutType, + "content_name": .properties.contentName, + "content_category": .properties.contentCategory, + "content_brand": .properties.contentBrand, + "np": .properties.np }); $.removeUndefinedValues(customFields) @@ -143,7 +151,11 @@ steps: "content_ids": products.(.product_id ?? .sku ?? .id)[], "contents": .message.properties@prop.products.({ "quantity": Number(.quantity ?? prop.quantity ?? 1), - "item_price": String(.price ?? prop.price) + "item_price": String(.price ?? prop.price), + "item_name": String(.name), + "id": .product_id ?? .sku, + "item_category": .category, + "item_brand": .brand })[] } else: diff --git a/src/cdk/v2/destinations/pinterest_tag/rtWorkflow.yaml b/src/cdk/v2/destinations/pinterest_tag/rtWorkflow.yaml index 215ead12b1..bd4a9439f0 100644 --- a/src/cdk/v2/destinations/pinterest_tag/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/pinterest_tag/rtWorkflow.yaml @@ -1,5 +1,5 @@ bindings: - - path: ../../../../v0/destinations/pinterest_tag/config + - path: ./config - name: batchMultiplexedEvents path: ../../../../v0/util/index steps: diff --git a/src/cdk/v2/destinations/pinterest_tag/utils.js b/src/cdk/v2/destinations/pinterest_tag/utils.js new file mode 100644 index 0000000000..31a897f133 --- /dev/null +++ b/src/cdk/v2/destinations/pinterest_tag/utils.js @@ -0,0 +1,150 @@ +/* eslint-disable no-param-reassign */ +const sha256 = require('sha256'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); + +const { API_VERSION } = require('./config'); + +const VALID_ACTION_SOURCES = ['app_android', 'app_ios', 'web', 'offline']; + +const ecomEventMaps = [ + { + src: ['order completed'], + dest: 'checkout', + }, + { + src: ['product added'], + dest: 'add_to_cart', + }, + { + src: ['products searched', 'product list filtered'], + dest: 'search', + }, +]; + +const USER_NON_ARRAY_PROPERTIES = ['client_user_agent', 'client_ip_address']; + +const getHashedValue = (key, value) => { + switch (key) { + case 'em': + case 'ct': + case 'st': + case 'country': + case 'ln': + case 'fn': + case 'ge': + value = Array.isArray(value) + ? value.map((val) => val.toString().trim().toLowerCase()) + : value.toString().trim().toLowerCase(); + break; + case 'ph': + // phone numbers should only contain digits & should not contain leading zeros + value = Array.isArray(value) + ? value.map((val) => val.toString().replace(/\D/g, '').replace(/^0+/, '')) + : value.toString().replace(/\D/g, '').replace(/^0+/, ''); + break; + case 'zp': + // zip fields should only contain digits + value = Array.isArray(value) + ? value.map((val) => val.toString().trim().replace(/\D/g, '')) + : value.toString().replace(/\D/g, ''); + break; + case 'hashed_maids': + case 'external_id': + case 'db': + // no action needed on value + break; + default: + return String(value); + } + return Array.isArray(value) ? value.map((val) => sha256(val)) : [sha256(value)]; +}; + +/** + * + * @param {*} userPayload Payload mapped from user fields + * @returns + * Further Processing the user fields following the instructions of Pinterest Conversion API + * Ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html + */ +const processUserPayload = (userPayload) => { + Object.keys(userPayload).forEach((key) => { + userPayload[key] = getHashedValue(key, userPayload[key]); + }); + return userPayload; +}; + +/** + * + * @param {*} eventName // ["WatchVideo", "ViewCategory", "Custom"] + * @returns // ["watch_video", "view_category", "custom""] + * This function will return the snake case name of the destination config mapped event + */ +const convertToSnakeCase = (eventName) => + eventName.map((str) => + str + .replace(/([a-z])([A-Z])/g, '$1_$2') + .replace(/\s+/g, '_') + .toLowerCase(), + ); + +/** + * + * @param {*} userPayload + * @param {*} message + * @returns converts every single hashed user data property to array, except for + * "client_user_agent", "client_ip_address" + * + */ +const processHashedUserPayload = (userPayload, message) => { + const processedHashedUserPayload = {}; + Object.keys(userPayload).forEach((key) => { + if (!USER_NON_ARRAY_PROPERTIES.includes(key)) { + if (Array.isArray(userPayload[key])) { + processedHashedUserPayload[key] = [...userPayload[key]]; + } else { + processedHashedUserPayload[key] = [userPayload[key]]; + } + } else { + processedHashedUserPayload[key] = userPayload[key]; + } + }); + // multiKeyMap will works on only specific values like m, male, MALE, f, F, Female + // if hashed data is sent from the user, it is directly set over here + const gender = message.traits?.gender || message.context?.traits?.gender; + if (gender && Array.isArray(gender)) { + processedHashedUserPayload.ge = [...gender]; + } else if (gender) { + processedHashedUserPayload.ge = [gender]; + } + return processedHashedUserPayload; +}; + +const validateInput = (message, { Config }) => { + const { apiVersion = API_VERSION.v3, advertiserId, adAccountId, conversionToken } = Config; + if (apiVersion === API_VERSION.v3 && !advertiserId) { + throw new ConfigurationError('Advertiser Id not found. Aborting'); + } + + if (apiVersion === API_VERSION.v5) { + if (!adAccountId) { + throw new ConfigurationError('Ad Account ID not found. Aborting'); + } + + if (!conversionToken) { + throw new ConfigurationError('Conversion Token not found. Aborting'); + } + } + + if (!message.type) { + throw new InstrumentationError('Event type is required'); + } +}; + +module.exports = { + processUserPayload, + processHashedUserPayload, + VALID_ACTION_SOURCES, + ecomEventMaps, + convertToSnakeCase, + validateInput, +}; diff --git a/src/v0/destinations/pinterest_tag/utils.test.js b/src/cdk/v2/destinations/pinterest_tag/utils.test.js similarity index 97% rename from src/v0/destinations/pinterest_tag/utils.test.js rename to src/cdk/v2/destinations/pinterest_tag/utils.test.js index 6b4cef9567..1c1d080ef5 100644 --- a/src/v0/destinations/pinterest_tag/utils.test.js +++ b/src/cdk/v2/destinations/pinterest_tag/utils.test.js @@ -1,4 +1,4 @@ -const { processUserPayload } = require('../../../../src/v0/destinations/pinterest_tag/utils'); +const { processUserPayload } = require('./utils'); const userFields = [ { diff --git a/src/v0/destinations/pinterest_tag/config.js b/src/v0/destinations/pinterest_tag/config.js deleted file mode 100644 index 9216b6f61b..0000000000 --- a/src/v0/destinations/pinterest_tag/config.js +++ /dev/null @@ -1,31 +0,0 @@ -const { getMappingConfig } = require('../../util'); - -const ENDPOINT = 'https://ct.pinterest.com/events/v3'; -// ref: https://developers.pinterest.com/docs/api/v5/#tag/conversion_events -const getV5EventsEndpoint = (adAccountId) => - `https://api.pinterest.com/v5/ad_accounts/${adAccountId}/events`; - -const API_VERSION = { - v3: 'legacyApi', - v5: 'newApi', -}; - -// ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html -const MAX_BATCH_SIZE = 1000; - -const CONFIG_CATEGORIES = { - USER_CONFIGS: { name: 'pinterestUserConfig' }, - COMMON_CONFIGS: { name: 'pinterestCommonConfig' }, - CUSTOM_CONFIGS: { name: 'pinterestCustomConfig' }, -}; -const MAPPING_CONFIG = getMappingConfig(CONFIG_CATEGORIES, __dirname); - -module.exports = { - ENDPOINT, - MAX_BATCH_SIZE, - USER_CONFIGS: MAPPING_CONFIG[CONFIG_CATEGORIES.USER_CONFIGS.name], - COMMON_CONFIGS: MAPPING_CONFIG[CONFIG_CATEGORIES.COMMON_CONFIGS.name], - CUSTOM_CONFIGS: MAPPING_CONFIG[CONFIG_CATEGORIES.CUSTOM_CONFIGS.name], - getV5EventsEndpoint, - API_VERSION, -}; diff --git a/src/v0/destinations/pinterest_tag/data/pinterestCommonConfig.json b/src/v0/destinations/pinterest_tag/data/pinterestCommonConfig.json deleted file mode 100644 index 52645fa25a..0000000000 --- a/src/v0/destinations/pinterest_tag/data/pinterestCommonConfig.json +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "destKey": "event_name", - "sourceKeys": "event" - }, - { - "destKey": "event_time", - "sourceKeys": "timestamp", - "sourceFromGenericMap": true, - "required": true, - "metadata": { - "type": "secondTimestamp" - } - }, - { - "destKey": "event_source_url", - "sourceKeys": "pageUrl", - "sourceFromGenericMap": true - }, - { - "destKey": "action_source", - "sourceKeys": [ - "traits.action_source", - "context.traits.action_source", - "traits.actionSource", - "context.traits.actionSource", - "properties.action_source", - "properties.actionSource", - "channel" - ], - "required": true - }, - { - "destKey": "app_name", - "sourceKeys": ["properties.appName", "context.app.name"] - }, - { - "destKey": "app_version", - "sourceKeys": ["properties.appVersion", "context.app.version"] - }, - { - "destKey": "device_brand", - "sourceKeys": ["properties.manufacturer", "context.device.manufacturer"] - }, - { - "destKey": "device_model", - "sourceKeys": ["properties.deviceModel", "context.device.model"] - }, - { - "destKey": "device_type", - "sourceKeys": ["properties.deviceType", "context.device.type"] - }, - { - "destKey": "os_version", - "sourceKeys": "context.os.version" - }, - { - "destKey": "language", - "sourceKeys": ["properties.language", "context.traits.language", "context.locale"] - } -] diff --git a/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json b/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json deleted file mode 100644 index 55c9e1e9ed..0000000000 --- a/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "destKey": "currency", - "sourceKeys": "properties.currency", - "required": false - }, - { - "destKey": "value", - "sourceKeys": ["properties.value", "properties.total", "properties.revenue"], - "required": false, - "metadata": { - "type": "toString" - } - }, - { - "destKey": "num_items", - "sourceKeys": "properties.numOfItems", - "metadata": { - "type": "toInt" - }, - "required": false - }, - { - "destKey": "order_id", - "sourceKeys": "properties.order_id", - "required": false - }, - { - "destKey": "search_string", - "sourceKeys": "properties.query", - "required": false - }, - { - "destKey": "opt_out_type", - "sourceKeys": "properties.optOutType", - "required": false - } -] diff --git a/src/v0/destinations/pinterest_tag/data/pinterestUserConfig.json b/src/v0/destinations/pinterest_tag/data/pinterestUserConfig.json deleted file mode 100644 index b95f539e7c..0000000000 --- a/src/v0/destinations/pinterest_tag/data/pinterestUserConfig.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "destKey": "em", - "sourceKeys": "emailOnly", - "sourceFromGenericMap": true, - "required": false - }, - { - "destKey": "ph", - "sourceKeys": "phone", - "sourceFromGenericMap": true, - "required": false - }, - { - "destKey": "ge", - "sourceKeys": ["traits.gender", "context.traits.gender"], - "required": false, - "metadata": { - "multikeyMap": [ - { - "sourceVal": ["f", "F", "Female", "female", "FEMALE"], - "destVal": "f" - }, - { - "sourceVal": ["m", "M", "Male", "male", "MALE"], - "destVal": "m" - }, - { - "sourceVal": ["n", "N", "non-binary", "non binary", "Non-Binary", "Non Binary"], - "destVal": "n" - } - ] - } - }, - { - "destKey": "db", - "sourceKeys": "birthday", - "required": false, - "sourceFromGenericMap": true - }, - { - "destKey": "ln", - "sourceKeys": "lastName", - "required": false, - "sourceFromGenericMap": true - }, - { - "destKey": "fn", - "sourceKeys": "firstName", - "required": false, - "sourceFromGenericMap": true - }, - { - "destKey": "ct", - "sourceKeys": ["traits.address.city", "context.traits.address.city"], - "required": false - }, - { - "destKey": "st", - "sourceKeys": ["traits.address.state", "context.traits.address.state"], - "required": false - }, - { - "destKey": "zp", - "sourceKeys": ["traits.address.zip", "context.traits.address.zip"], - "required": false - }, - { - "destKey": "country", - "sourceKeys": ["traits.address.country", "context.traits.address.country"], - "required": false - }, - { - "destKey": "hashed_maids", - "sourceKeys": ["context.device.advertisingId"], - "required": false - }, - { - "destKey": "client_ip_address", - "sourceKeys": ["context.ip", "request_ip"], - "required": false - }, - { - "destKey": "client_user_agent", - "sourceKeys": "context.userAgent", - "required": false - }, - { - "destKey": "external_id", - "sourceKeys": "userId", - "sourceFromGenericMap": true - } -] diff --git a/src/v0/destinations/pinterest_tag/transform.js b/src/v0/destinations/pinterest_tag/transform.js deleted file mode 100644 index f8ccfd48ea..0000000000 --- a/src/v0/destinations/pinterest_tag/transform.js +++ /dev/null @@ -1,202 +0,0 @@ -const { get } = require('lodash'); -const { InstrumentationError } = require('@rudderstack/integrations-lib'); -const { EventType } = require('../../../constants'); -const { - defaultRequestConfig, - defaultPostRequestConfig, - getSuccessRespEvents, - constructPayload, - defaultBatchRequestConfig, - removeUndefinedAndNullValues, - batchMultiplexedEvents, - handleRtTfSingleEventError, -} = require('../../util'); -const { - processUserPayload, - processCommonPayload, - deduceEventName, - postProcessEcomFields, - checkUserPayloadValidity, - processHashedUserPayload, - validateInput, -} = require('./utils'); - -const { - ENDPOINT, - MAX_BATCH_SIZE, - USER_CONFIGS, - getV5EventsEndpoint, - API_VERSION, -} = require('./config'); - -const responseBuilderSimple = (finalPayload, { Config }) => { - const { apiVersion = API_VERSION.v3, adAccountId, conversionToken, sendAsTestEvent } = Config; - const response = defaultRequestConfig(); - response.endpoint = ENDPOINT; - response.method = defaultPostRequestConfig.requestMethod; - response.body.JSON = removeUndefinedAndNullValues(finalPayload); - - response.headers = { 'Content-Type': 'application/json' }; - - if (apiVersion === API_VERSION.v5) { - response.endpoint = getV5EventsEndpoint(adAccountId); - response.headers = { - 'Content-Type': 'application/json', - Authorization: `Bearer ${conversionToken}`, - }; - } - if (sendAsTestEvent) { - response.params = { - test: true, - }; - } - - return response; -}; - -/** - * - * @param {*} message - * @param {*} destination.Config - * @param {*} messageType - * @param {*} eventName - * @returns the output of each input payload. - * message deduplication logic looks like below: - * This facility is provided *only* for the users who are using the *new configuration*. - * if "enableDeduplication" is set to *true* and "deduplicationKey" is set via webapp, that key value will be - * sent as "event_id". On it's absence it will fallback to "messageId". - * And if "enableDeduplication" is set to false, it will fallback to "messageId" - */ -const commonFieldResponseBuilder = (message, { Config }, messageType, eventName) => { - let processedUserPayload; - const { appId, advertiserId, deduplicationKey, sendingUnHashedData, sendExternalId, apiVersion } = - Config; - // ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html - const processedCommonPayload = processCommonPayload(message); - - processedCommonPayload.event_id = get(message, `${deduplicationKey}`) || message.messageId; - const userPayload = constructPayload(message, USER_CONFIGS, 'pinterest'); - - if (!sendExternalId) { - delete userPayload.external_id; - } - - const isValidUserPayload = checkUserPayloadValidity(userPayload); - if (isValidUserPayload === false) { - throw new InstrumentationError( - 'It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent', - ); - } - - /** - * User can configure hashed checkbox to false if they are sending already hashed data to Rudderstack - * Otherwise we will hash data user data by default. - */ - if (sendingUnHashedData) { - processedUserPayload = processUserPayload(userPayload); - } else { - // when user is sending already hashed data to Rudderstack - processedUserPayload = processHashedUserPayload(userPayload, message); - } - - let response = { - ...processedCommonPayload, - event_name: eventName, - app_id: appId, - advertiser_id: advertiserId, - user_data: processedUserPayload, - }; - - if (apiVersion === API_VERSION.v5) { - delete response.advertiser_id; - } - - if (messageType === EventType.TRACK) { - response = postProcessEcomFields(message, response); - } - - return response; -}; - -const process = (event) => { - const toSendEvents = []; - const respList = []; - const deducedEventNameArray = []; - const { message, destination } = event; - const messageType = message.type?.toLowerCase(); - - validateInput(message, destination); - - switch (messageType) { - case EventType.PAGE: - case EventType.SCREEN: - case EventType.TRACK: - deducedEventNameArray.push(...deduceEventName(message, destination.Config)); - deducedEventNameArray.forEach((eventName) => { - toSendEvents.push(commonFieldResponseBuilder(message, destination, messageType, eventName)); - }); - - break; - default: - throw new InstrumentationError(`message type ${messageType} is not supported`); - } - - toSendEvents.forEach((sendEvent) => { - respList.push(responseBuilderSimple(sendEvent, destination)); - }); - return respList; -}; - -const generateBatchedPayloadForArray = (events) => { - const { batchedRequest } = defaultBatchRequestConfig(); - const batchResponseList = events.map((event) => event.body.JSON); - batchedRequest.body.JSON = { data: batchResponseList }; - batchedRequest.endpoint = events[0].endpoint; - batchedRequest.headers = events[0].headers; - - return batchedRequest; -}; - -const batchEvents = (successRespList) => { - const batchResponseList = []; - const batchedEvents = batchMultiplexedEvents(successRespList, MAX_BATCH_SIZE); - batchedEvents.forEach((batch) => { - const batchedRequest = generateBatchedPayloadForArray(batch.events); - batchResponseList.push( - getSuccessRespEvents(batchedRequest, batch.metadata, batch.destination, true), - ); - }); - - return batchResponseList; -}; - -const processRouterDest = (inputs, reqMetadata) => { - const successRespList = []; - const batchErrorRespList = []; - inputs.forEach((input) => { - try { - let resp = input.message; - // transform if not already done - if (!input.message.statusCode) { - resp = process(input); - } - - successRespList.push({ - message: Array.isArray(resp) ? resp : [resp], - metadata: input.metadata, - destination: input.destination, - }); - } catch (error) { - batchErrorRespList.push(handleRtTfSingleEventError(input, error, reqMetadata)); - } - }); - - let batchResponseList = []; - if (successRespList.length > 0) { - batchResponseList = batchEvents(successRespList); - } - - return [...batchResponseList, ...batchErrorRespList]; -}; - -module.exports = { process, processRouterDest }; diff --git a/src/v0/destinations/pinterest_tag/utils.js b/src/v0/destinations/pinterest_tag/utils.js deleted file mode 100644 index 57d595571f..0000000000 --- a/src/v0/destinations/pinterest_tag/utils.js +++ /dev/null @@ -1,416 +0,0 @@ -/* eslint-disable no-param-reassign */ -const sha256 = require('sha256'); -const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); -const { EventType } = require('../../../constants'); -const { - constructPayload, - isDefinedAndNotNull, - isDefined, - getHashFromArrayWithDuplicate, - removeUndefinedAndNullValues, - validateEventName, -} = require('../../util'); -const { COMMON_CONFIGS, CUSTOM_CONFIGS, API_VERSION } = require('./config'); - -const VALID_ACTION_SOURCES = ['app_android', 'app_ios', 'web', 'offline']; - -const ecomEventMaps = [ - { - src: ['order completed'], - dest: 'checkout', - }, - { - src: ['product added'], - dest: 'add_to_cart', - }, - { - src: ['products searched', 'product list filtered'], - dest: 'search', - }, -]; - -const USER_NON_ARRAY_PROPERTIES = ['client_user_agent', 'client_ip_address']; - -const getHashedValue = (key, value) => { - switch (key) { - case 'em': - case 'ct': - case 'st': - case 'country': - case 'ln': - case 'fn': - case 'ge': - value = Array.isArray(value) - ? value.map((val) => val.toString().trim().toLowerCase()) - : value.toString().trim().toLowerCase(); - break; - case 'ph': - // phone numbers should only contain digits & should not contain leading zeros - value = Array.isArray(value) - ? value.map((val) => val.toString().replace(/\D/g, '').replace(/^0+/, '')) - : value.toString().replace(/\D/g, '').replace(/^0+/, ''); - break; - case 'zp': - // zip fields should only contain digits - value = Array.isArray(value) - ? value.map((val) => val.toString().trim().replace(/\D/g, '')) - : value.toString().replace(/\D/g, ''); - break; - case 'hashed_maids': - case 'external_id': - case 'db': - // no action needed on value - break; - default: - return String(value); - } - return Array.isArray(value) ? value.map((val) => sha256(val)) : [sha256(value)]; -}; - -/** - * - * @param {*} userPayload Payload mapped from user fields - * @returns - * Further Processing the user fields following the instructions of Pinterest Conversion API - * Ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html - */ -const processUserPayload = (userPayload) => { - Object.keys(userPayload).forEach((key) => { - userPayload[key] = getHashedValue(key, userPayload[key]); - }); - return userPayload; -}; - -/** - * - * @param {*} message - * @returns opt_out status - * - */ - -const deduceOptOutStatus = (message) => { - const adTrackingEnabled = message.context?.device?.adTrackingEnabled; - let optOut; - - // for ios - if (isDefinedAndNotNull(adTrackingEnabled)) { - if (adTrackingEnabled === true) { - optOut = false; - } else if (adTrackingEnabled === false) { - optOut = true; - } - } - - return optOut; -}; - -/** - * - * @param {*} message - * @returns - * Maps the required common parameters accross event types. Checks for the correct - * action source types and deduces opt_out status - * Ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html - */ -const processCommonPayload = (message) => { - const commonPayload = constructPayload(message, COMMON_CONFIGS); - const presentActionSource = commonPayload.action_source; - if (presentActionSource && !VALID_ACTION_SOURCES.includes(presentActionSource.toLowerCase())) { - throw new InstrumentationError( - `Action source must be one of ${VALID_ACTION_SOURCES.join(', ')}`, - ); - } - - commonPayload.opt_out = deduceOptOutStatus(message); - - return commonPayload; -}; - -/** - * - * @param {*} eventName // ["WatchVideo", "ViewCategory", "Custom"] - * @returns // ["watch_video", "view_category", "custom""] - * This function will return the snake case name of the destination config mapped event - */ -const convertToSnakeCase = (eventName) => - eventName.map((str) => - str - .replace(/([a-z])([A-Z])/g, '$1_$2') - .replace(/\s+/g, '_') - .toLowerCase(), - ); - -/** - * - * @param {*} message - * @param {*} Config - * @returns - * For the few ecommerce events the mapping is like following: - * const ecomEventMaps = [ - { - src: ["order completed"], - dest: "checkout", - }, - { - src: ["product added"], - dest: "add_to_cart", - }, - { - src: ["products searched", "product list filtered"], - dest: "search", - }, - ]; - * For others, it depends on mapping from the UI. If any event, other than mapped events are sent, - * will be labled as "custom" events. - */ -const deduceTrackScreenEventName = (message, Config) => { - let eventName; - const { event, name } = message; - const { eventsMapping, sendAsCustomEvent } = Config; - const trackEventOrScreenName = event || name; - if (!trackEventOrScreenName) { - throw new InstrumentationError('event_name could not be mapped. Aborting'); - } - validateEventName(trackEventOrScreenName); - - /* - Step 1: If the event is not amongst the above list of ecommerce events, will look for - the event mapping in the UI. In case it is similar, will map to that. - */ - if (eventsMapping.length > 0) { - const keyMap = getHashFromArrayWithDuplicate(eventsMapping, 'from', 'to', false); - eventName = keyMap[trackEventOrScreenName]; - } - if (isDefined(eventName)) { - return convertToSnakeCase([...eventName]); - } - - /* - Step 2: To find if the particular event is amongst the list of standard - Rudderstack ecommerce events, used specifically for Pinterest Conversion API - mappings. - */ - if (!eventName) { - const eventMapInfo = ecomEventMaps.find((eventMap) => { - if (eventMap.src.includes(trackEventOrScreenName.toLowerCase())) { - return eventMap; - } - return false; - }); - - if (isDefinedAndNotNull(eventMapInfo)) { - return [eventMapInfo.dest]; - } - } - - /* - Step 3: In case both of the above stated cases fail, will check if sendAsCustomEvent toggle is enabled in UI. - If yes, then we will send it as custom event - */ - if (sendAsCustomEvent) { - return ['custom']; - } - - /* - Step 4: In case all of the above stated cases failed, will send the event name as it is. - This is going to be reflected as "unknown" event in conversion API dashboard. - */ - return [trackEventOrScreenName]; -}; - -/** - * - * @param {*} message event.message - * @param {*} Config event.destination.Config - * @returns - * Returns the appropriate event name for each event types - * For identify : "identify". - * For page : "ViewCategory" in case category is present, "PageVisit" otherwise. - * For track : Depends on the event name - */ -const deduceEventName = (message, Config) => { - const { type, category } = message; - let eventName = []; - switch (type) { - case EventType.PAGE: - eventName = isDefinedAndNotNull(category) ? ['view_category'] : ['page_visit']; - break; - case EventType.TRACK: - case EventType.SCREEN: - eventName = deduceTrackScreenEventName(message, Config); - break; - default: - throw new InstrumentationError(`The event of type ${type} is not supported`); - } - return eventName; -}; - -/** - * - * @param {*} rootObject object from where the price, quantity and ids will be fetched - * @param {*} message event.message - * @returns - * Object containing the deduced parameters - */ -const setIdPriceQuantity = (rootObject, message) => { - const contentObj = { - // we are yet to check how the destination behaves if one of quantity and item_price is missing - quantity: parseInt(rootObject.quantity || message.properties.quantity || 1, 10), - item_price: String(rootObject.price || message.properties.price), - }; - return { - contentId: rootObject.product_id || rootObject.sku || rootObject.id, - content: contentObj, - }; -}; - -/** - * @param {*} userPayload Payload mapped from user fields - * @returns returns true if at least one of: em, hashed_maids or combination of client_ip_address and - * client_user_agent is present. And false otherwise. - */ -const checkUserPayloadValidity = (userPayload) => { - const userFields = Object.keys(userPayload); - if (userFields.includes('em') || userFields.includes('hashed_maids')) { - return true; - } - return userFields.includes('client_ip_address') && userFields.includes('client_user_agent'); -}; - -/** - * - * @param {*} userPayload - * @param {*} message - * @returns converts every single hashed user data property to array, except for - * "client_user_agent", "client_ip_address" - * - */ -const processHashedUserPayload = (userPayload, message) => { - const processedHashedUserPayload = {}; - Object.keys(userPayload).forEach((key) => { - if (!USER_NON_ARRAY_PROPERTIES.includes(key)) { - if (Array.isArray(userPayload[key])) { - processedHashedUserPayload[key] = [...userPayload[key]]; - } else { - processedHashedUserPayload[key] = [userPayload[key]]; - } - } else { - processedHashedUserPayload[key] = userPayload[key]; - } - }); - // multiKeyMap will works on only specific values like m, male, MALE, f, F, Female - // if hashed data is sent from the user, it is directly set over here - const gender = message.traits?.gender || message.context?.traits?.gender; - if (gender && Array.isArray(gender)) { - processedHashedUserPayload.ge = [...gender]; - } else if (gender) { - processedHashedUserPayload.ge = [gender]; - } - return processedHashedUserPayload; -}; - -/** - * This function will process the ecommerce fields and return the final payload - * @param {*} message - * @param {*} mandatoryPayload - * @returns - */ -const postProcessEcomFields = (message, mandatoryPayload) => { - let totalQuantity = 0; - let quantityInconsistent = false; - const contentArray = []; - const contentIds = []; - const { properties } = message; - // ref: https://s.pinimg.com/ct/docs/conversions_api/dist/v3.html - let customPayload = constructPayload(message, CUSTOM_CONFIGS); - - // if product array is present will look for the product level information - if (properties.products && Array.isArray(properties.products) && properties.products.length > 0) { - const { products, quantity } = properties; - products.forEach((product) => { - const prodParams = setIdPriceQuantity(product, message); - if (prodParams.contentId) { - contentIds.push(prodParams.contentId); - } - contentArray.push(prodParams.content); - if (!product.quantity) { - quantityInconsistent = true; - } - totalQuantity = product.quantity ? totalQuantity + product.quantity : totalQuantity; - }); - - if (totalQuantity === 0) { - /* - in case any of the products inside product array does not have quantity, - will map the quantity of root level - */ - totalQuantity = quantity; - } - } else { - /* - for the events where product array is not present, root level id, price and - quantity are taken into consideration - */ - const prodParams = setIdPriceQuantity(properties, message); - if (prodParams.contentId) { - contentIds.push(prodParams.contentId); - } - contentArray.push(prodParams.content); - totalQuantity = properties.quantity ? totalQuantity + properties.quantity : totalQuantity; - } - /* - if properties.numOfItems is not provided by the user, the total quantity of the products - will be sent as num_items - */ - if (!isDefinedAndNotNull(customPayload.num_items) && quantityInconsistent === false) { - customPayload.num_items = parseInt(totalQuantity, 10); - } - customPayload = { - ...customPayload, - contents: contentArray, - }; - - if (contentIds.length > 0) { - customPayload.content_ids = contentIds; - } - - return { - ...mandatoryPayload, - custom_data: { ...removeUndefinedAndNullValues(customPayload) }, - }; -}; - -const validateInput = (message, { Config }) => { - const { apiVersion = API_VERSION.v3, advertiserId, adAccountId, conversionToken } = Config; - if (apiVersion === API_VERSION.v3 && !advertiserId) { - throw new ConfigurationError('Advertiser Id not found. Aborting'); - } - - if (apiVersion === API_VERSION.v5) { - if (!adAccountId) { - throw new ConfigurationError('Ad Account ID not found. Aborting'); - } - - if (!conversionToken) { - throw new ConfigurationError('Conversion Token not found. Aborting'); - } - } - - if (!message.type) { - throw new InstrumentationError('Event type is required'); - } -}; - -module.exports = { - processUserPayload, - processCommonPayload, - deduceEventName, - setIdPriceQuantity, - checkUserPayloadValidity, - processHashedUserPayload, - VALID_ACTION_SOURCES, - postProcessEcomFields, - ecomEventMaps, - convertToSnakeCase, - validateInput, -}; diff --git a/test/__tests__/data/pinterest_tag_input.json b/test/__tests__/data/pinterest_tag_input.json deleted file mode 100644 index f0755ddb38..0000000000 --- a/test/__tests__/data/pinterest_tag_input.json +++ /dev/null @@ -1,2476 +0,0 @@ -[ - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "gender": "non-binary", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsTestEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Order completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "product added", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "product_id": "123", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Product List Filtered", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Product List Filtered", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "enhancedMatch": true, - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "channel": "abc", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123", - "adTrackingEnabled": true - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "ip": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "adTrackingEnabled": false - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "requestIP": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "Hashed phone", - "gender": "Hashed Gender", - "dob": "Hashed DB", - "lastname": "Hashed Lastname", - "firstName": "Hashed FirstName", - "address": { - "city": "Hashed City", - "state": "Hashed State", - "zip": "Hashed Zip", - "country": "Hashed country" - } - }, - "device": { - "adTrackingEnabled": false, - "advertisingId": "Hashed maids" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": false, - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "requestIP": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": ["Hashed phone", "Hashed phone1"], - "gender": ["Hashed Gender", "Hashed Gender1"], - "dob": ["Hashed DB", "Hashed DB1"], - "lastname": ["Hashed Lastname", "Hashed Lastname1"], - "firstName": ["Hashed FirstName", "Hashed FirstName1"], - "address": { - "city": ["Hashed City", "Hashed City1"], - "state": ["Hashed State", "Hashed State1"], - "zip": ["Hashed Zip", "Hashed Zip1"], - "country": ["Hashed country", "Hashed country1"] - } - }, - "device": { - "adTrackingEnabled": false, - "advertisingId": "Hashed maids" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": false, - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "name": "Test Tool", - "type": "page", - "sentAt": "2023-02-01T00:00:00.379Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "version": "2.22.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://www.abc.com/s598907", - "path": "/test-path/s598907", - "title": "Test Tool + Reviews | Rudderstack", - "search": "", - "tab_url": "https://www.abc.com/s598907", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1024, - "height": 1024, - "density": 1, - "innerWidth": 1024, - "innerHeight": 1024 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.22.3" - }, - "campaign": {}, - "doNotSell": false, - "sessionId": 1675209600203, - "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/109.0.5414.101 Safari/537.36", - "gaClientId": { - "integrations": { - "Google Ads": { - "gclid": "" - }, - "Google Analytics": { - "clientId": "1518934611.1234569600" - } - } - }, - "sessionStart": true - }, - "rudderId": "7291a10f-e7dd-49f9-94ce-0154f53897y6", - "messageId": "1c77a616-13a7-4a2e-a8e7-e1a0971897y6", - "timestamp": "2023-02-01T12:47:30.030Z", - "properties": { - "sku": "45790-32", - "url": "https://www.abc.com/23rty", - "name": "Test Tool", - "path": "/test-path/tool", - "email": "", - "title": "Test Tool + Reviews | Rudderstack", - "review": { - "reviewCount": 2, - "averageReview": 5, - "reviewContentID": ["238300132"] - }, - "search": "", - "tab_url": "https://www.abc/com", - "pageInfo": { - "pageId": "s592897", - "category": { - "pageType": "product", - "subCategory": "Dining & Kitchen Furniture", - "pageTemplate": "product detail grouper", - "primaryCategory": "Furniture" - }, - "brandType": "new brand" - }, - "referrer": "", - "subCategory": "Dining & Kitchen Furniture", - "primaryCategory": "Furniture", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "receivedAt": "2023-02-01T12:47:30.038Z", - "request_ip": "66.249.72.218", - "anonymousId": "a61c77a6-1613-474a-aee8-e7e1a0971047", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-02-01T00:00:00.371Z" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123478671210", - "sendingUnHashedData": false, - "enableDeduplication": false, - "eventsMapping": [ - { - "from": "Product Added", - "to": "AddToCart" - }, - { - "from": "Order Completed", - "to": "Checkout" - }, - { - "from": "Product Viewed", - "to": "PageVisit" - }, - { - "from": "Lead", - "to": "Lead" - }, - { - "from": "Signup", - "to": "Signup" - } - ], - "enhancedMatch": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "test", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "sku": "1234", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "sku": "1234", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - } - ] - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Track call with v5 Api version and send external_id toggle enabled", - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendExternalId": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Custom event with v5 Api version", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Custom event with v5 Api version, with unhashed User Data and the values are an array of strings", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": ["abc@gmail.com", "def@gmail.com"], - "phone": ["+1234589947", "+1234589948"], - "ge": ["male", "male"], - "db": ["19950715", "19970615"], - "lastname": ["Rudderlabs", "Xu"], - "firstName": ["Test", "Alex"], - "address": { - "city": ["Kolkata", "Mumbai"], - "state": ["WB", "MH"], - "zip": ["700114", "700115"], - "country": ["IN", "IN"] - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Ad Account Id check in V5", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Conversion Token check in V5", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": false, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } -] diff --git a/test/__tests__/data/pinterest_tag_output.json b/test/__tests__/data/pinterest_tag_output.json deleted file mode 100644 index 9fb809d112..0000000000 --- a/test/__tests__/data/pinterest_tag_output.json +++ /dev/null @@ -1,966 +0,0 @@ -[ - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "test": true - }, - "body": { - "JSON": { - "action_source": "web", - "event_name": "watch_video", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome", - "ge": ["1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9"] - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "checkout", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "add_to_cart", - "action_source": "web", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 2, - "content_ids": ["123"], - "contents": [ - { - "quantity": 2, - "item_price": "25" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Advertiser Id not found. Aborting" - }, - { - "statusCode": 400, - "error": "It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "watch_video", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "num_items": 2, - "order_id": "50314b8e9bcf000000000000", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Advertiser Id not found. Aborting" - }, - { - "statusCode": 400, - "error": "message type group is not supported" - }, - { - "statusCode": 400, - "error": "Action source must be one of app_android, app_ios, web, offline" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "action_source": "web", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "num_items": 2, - "order_id": "50314b8e9bcf000000000000", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "page_visit", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "opt_out": false, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "opt_out": true, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "client_ip_address": "127.0.0.0", - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "action_source": "web", - "opt_out": true, - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "user_data": { - "ph": ["Hashed phone"], - "db": ["Hashed DB"], - "ln": ["Hashed Lastname"], - "fn": ["Hashed FirstName"], - "ct": ["Hashed City"], - "st": ["Hashed State"], - "zp": ["Hashed Zip"], - "country": ["Hashed country"], - "hashed_maids": ["Hashed maids"], - "ge": ["Hashed Gender"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "action_source": "web", - "opt_out": true, - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "user_data": { - "ph": ["Hashed phone", "Hashed phone1"], - "db": ["Hashed DB", "Hashed DB1"], - "ln": ["Hashed Lastname", "Hashed Lastname1"], - "fn": ["Hashed FirstName", "Hashed FirstName1"], - "ct": ["Hashed City", "Hashed City1"], - "st": ["Hashed State", "Hashed State1"], - "zp": ["Hashed Zip", "Hashed Zip1"], - "country": ["Hashed country", "Hashed country1"], - "hashed_maids": ["Hashed maids"], - "ge": ["Hashed Gender", "Hashed Gender1"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "body": { - "JSON": { - "event_time": 1675255650, - "event_source_url": "https://www.abc.com/s598907", - "action_source": "web", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "2.22.3", - "language": "en-US", - "event_id": "1c77a616-13a7-4a2e-a8e7-e1a0971897y6", - "advertiser_id": "123478671210", - "user_data": { - "client_ip_address": "66.249.72.218", - "client_user_agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/109.0.5414.101 Safari/537.36" - }, - "event_name": "page_visit" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 0, - "content_ids": ["1234"], - "contents": [ - { - "quantity": 1, - "item_price": "undefined" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 1, - "content_ids": ["507f1f77bcf86cd799439011"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "action_source": "web", - "advertiser_id": "123456", - "app_id": "429047995", - "custom_data": { - "contents": [ - { - "item_price": "undefined", - "quantity": 1 - } - ], - "currency": "USD", - "num_items": 0, - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "custom event", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://ct.pinterest.com/events/v3", - "files": {}, - "headers": { - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "watch_video", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome", - "external_id": ["3217d71a74c219d6e31e28267b313a7ceb6a2c032db1a091c9416b25b2ae2bc8"] - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": [ - "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "c392e50ebeca7bea4405e9c545023451ac56620031f81263f681269bde14218b" - ], - "ph": [ - "d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b", - "22bdde2594851294f2a6f4c34af704e68b398b03129ea9ceb58f0ffe33f6db52" - ], - "ln": [ - "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "9c2f138690fca4890c3c4a6691610fbbbdf32091cc001f7355cfdf574baa52b9" - ], - "fn": [ - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "4135aa9dc1b842a653dea846903ddb95bfb8c5a10c504a7fa16e10bc31d1fdf0" - ], - "ct": [ - "6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85", - "d209bcc17778fd19fd2bc0c99a3868bf011da5162d3a75037a605768ebc276e2" - ], - "st": [ - "3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd", - "1b0316ed1cfed044035c55363e02ccafab26d66b1c2746b94d17285f043324aa" - ], - "zp": [ - "1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c", - "4d6755aa1e85517191f06cc91448696c173e1195ae51f94a1670116ac7b5c47b" - ], - "country": [ - "582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf", - "582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf" - ], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Ad Account ID not found. Aborting" - }, - { - "statusCode": 400, - "error": "Conversion Token not found. Aborting" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom event", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 0, - "contents": [ - { - "quantity": 1, - "item_price": "undefined" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] -] diff --git a/test/__tests__/data/pinterest_tag_router_batch_output.json b/test/__tests__/data/pinterest_tag_router_batch_output.json deleted file mode 100644 index 995d68428a..0000000000 --- a/test/__tests__/data/pinterest_tag_router_batch_output.json +++ /dev/null @@ -1,871 +0,0 @@ -[ - [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "data": [ - { - "event_name": "watch_video", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "signup", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "checkout", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1, - "userId": "u1" - }, - { - "jobId": 2, - "userId": "u1" - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "data": [ - { - "event_name": "add_to_cart", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 2, - "content_ids": ["123"], - "contents": [ - { - "quantity": 2, - "item_price": "25" - } - ] - } - }, - { - "event_name": "search", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "signup", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3, - "userId": "u1" - }, - { - "jobId": 4, - "userId": "u1" - }, - { - "jobId": 6, - "userId": "u1" - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "data": [ - { - "action_source": "web", - "event_name": "WatchVideo", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["bdfdee6414a89d72bfbf5ee90b1f85924467bae1e3980d83c2cd348dc31d5819"], - "fn": ["ee5db3fe0253b651aca3676692e0c59b25909304f5c51d223a02a215d104144b"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 7, - "userId": "u1" - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "metadata": [ - { - "jobId": 5, - "userId": "u1" - } - ], - "batched": false, - "statusCode": 400, - "error": "message type identify is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } - ], - [ - { - "batched": true, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "data": [ - { - "action_source": "web", - "app_id": "429047995", - "custom_data": { - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "item_price": "19", - "quantity": 1 - }, - { - "item_price": "3", - "quantity": 2 - } - ], - "currency": "USD", - "num_items": 3, - "opt_out_type": "LDP", - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "watch_video", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - }, - { - "action_source": "web", - "app_id": "429047995", - "custom_data": { - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "item_price": "19", - "quantity": 1 - }, - { - "item_price": "3", - "quantity": 2 - } - ], - "currency": "USD", - "num_items": 3, - "opt_out_type": "LDP", - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "signup", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - }, - { - "action_source": "web", - "app_id": "429047995", - "custom_data": { - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "item_price": "19", - "quantity": 1 - }, - { - "item_price": "3", - "quantity": 2 - } - ], - "currency": "USD", - "num_items": 3, - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "checkout", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "files": {}, - "headers": { - "Authorization": "Bearer conversionToken123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "sendAsTestEvent": false, - "adAccountId": "accountId123", - "apiVersion": "newApi", - "appId": "429047995", - "conversionToken": "conversionToken123", - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "deduplicationKey": "messageId", - "enableDeduplication": true, - "enhancedMatch": true, - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ], - "sendingUnHashedData": true, - "tagId": "123456789" - }, - "Enabled": true, - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Transformations": [] - }, - "metadata": [ - { - "jobId": 8, - "userId": "u1" - }, - { - "jobId": 9, - "userId": "u1" - } - ], - "statusCode": 200 - }, - { - "batched": true, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "data": [ - { - "action_source": "web", - "app_id": "429047995", - "custom_data": { - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "item_price": "19", - "quantity": 1 - }, - { - "item_price": "3", - "quantity": 2 - } - ], - "currency": "USD", - "num_items": 3, - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "custom", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "files": {}, - "headers": { - "Authorization": "Bearer conversionToken123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "sendAsTestEvent": false, - "adAccountId": "accountId123", - "apiVersion": "newApi", - "appId": "429047995", - "conversionToken": "conversionToken123", - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "deduplicationKey": "messageId", - "enableDeduplication": true, - "enhancedMatch": true, - "sendAsCustomEvent": true, - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ], - "sendingUnHashedData": true, - "tagId": "123456789" - }, - "Enabled": true, - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Transformations": [] - }, - "metadata": [ - { - "jobId": 10, - "userId": "u1" - } - ], - "statusCode": 200 - } - ] -] diff --git a/test/__tests__/data/pinterest_tag_router_error_input.json b/test/__tests__/data/pinterest_tag_router_error_input.json deleted file mode 100644 index ce188c7335..0000000000 --- a/test/__tests__/data/pinterest_tag_router_error_input.json +++ /dev/null @@ -1,124 +0,0 @@ -[ - { - "message": { - "type": "Identify", - "event": "User Signup", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 5, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "Watch Video" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } -] diff --git a/test/__tests__/data/pinterest_tag_router_error_output.json b/test/__tests__/data/pinterest_tag_router_error_output.json deleted file mode 100644 index 4cd4e6966c..0000000000 --- a/test/__tests__/data/pinterest_tag_router_error_output.json +++ /dev/null @@ -1,59 +0,0 @@ -[ - { - "metadata": [ - { - "jobId": 5, - "userId": "u1" - } - ], - "batched": false, - "statusCode": 400, - "error": "message type identify is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "Watch Video" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } -] diff --git a/test/__tests__/data/pinterest_tag_router_input.json b/test/__tests__/data/pinterest_tag_router_input.json deleted file mode 100644 index 26febec456..0000000000 --- a/test/__tests__/data/pinterest_tag_router_input.json +++ /dev/null @@ -1,1196 +0,0 @@ -[ - [ - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 1, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Order completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 2, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "product added", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "product_id": "123", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 3, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Product List Filtered", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 4, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "Identify", - "event": "User Signup", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 5, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "User Created", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 6, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "version": "1", - "statusCode": 200, - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "WatchVideo", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["bdfdee6414a89d72bfbf5ee90b1f85924467bae1e3980d83c2cd348dc31d5819"], - "fn": ["ee5db3fe0253b651aca3676692e0c59b25909304f5c51d223a02a215d104144b"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": { - "jobId": 7, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } - ], - [ - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 8, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Order completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 9, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Test", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "metadata": { - "jobId": 10, - "userId": "u1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } - ] -] diff --git a/test/__tests__/data/pinterest_tag_router_output.json b/test/__tests__/data/pinterest_tag_router_output.json deleted file mode 100644 index 2bfc7c3cf5..0000000000 --- a/test/__tests__/data/pinterest_tag_router_output.json +++ /dev/null @@ -1,663 +0,0 @@ -[ - [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "data": [ - { - "event_name": "watch_video", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "signup", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "checkout", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "add_to_cart", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 2, - "content_ids": ["123"], - "contents": [ - { - "quantity": 2, - "item_price": "25" - } - ] - } - }, - { - "event_name": "search", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "signup", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "action_source": "web", - "event_name": "WatchVideo", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["bdfdee6414a89d72bfbf5ee90b1f85924467bae1e3980d83c2cd348dc31d5819"], - "fn": ["ee5db3fe0253b651aca3676692e0c59b25909304f5c51d223a02a215d104144b"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1, - "userId": "u1" - }, - { - "jobId": 2, - "userId": "u1" - }, - { - "jobId": 3, - "userId": "u1" - }, - { - "jobId": 4, - "userId": "u1" - }, - { - "jobId": 6, - "userId": "u1" - }, - { - "jobId": 7, - "userId": "u1" - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "metadata": [ - { - "jobId": 5, - "userId": "u1" - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "batched": false, - "statusCode": 400, - "error": "message type identify is not supported", - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } - ], - [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "data": [ - { - "event_name": "watch_video", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "signup", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "opt_out_type": "LDP", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "checkout", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - { - "event_name": "custom", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": [ - "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090" - ], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 8, - "userId": "u1" - }, - { - "jobId": 9, - "userId": "u1" - }, - { - "jobId": 10, - "userId": "u1" - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - }, - { - "from": "ABC Searched", - "to": "Signup" - }, - { - "from": "User Signup", - "to": "Signup" - }, - { - "from": "User Created", - "to": "Signup" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } - ] -] diff --git a/test/__tests__/data/pinterest_tag_step_input.json b/test/__tests__/data/pinterest_tag_step_input.json deleted file mode 100644 index 7b4e507120..0000000000 --- a/test/__tests__/data/pinterest_tag_step_input.json +++ /dev/null @@ -1,2476 +0,0 @@ -[ - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "gender": "non-binary", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Order completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "product added", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "product_id": "123", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Product List Filtered", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "Product List Filtered", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "429047995", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "enhancedMatch": true, - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "ABC Searched", - "channel": "abc", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "numOfItems": 2, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123", - "adTrackingEnabled": true - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "ip": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "adTrackingEnabled": false - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "requestIP": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": "Hashed phone", - "gender": "Hashed Gender", - "dob": "Hashed DB", - "lastname": "Hashed Lastname", - "firstName": "Hashed FirstName", - "address": { - "city": "Hashed City", - "state": "Hashed State", - "zip": "Hashed Zip", - "country": "Hashed country" - } - }, - "device": { - "adTrackingEnabled": false, - "advertisingId": "Hashed maids" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": false, - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "page", - "name": "ApplicationLoaded", - "category": "test category", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "requestIP": "127.0.0.0", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "phone": ["Hashed phone", "Hashed phone1"], - "gender": ["Hashed Gender", "Hashed Gender1"], - "dob": ["Hashed DB", "Hashed DB1"], - "lastname": ["Hashed Lastname", "Hashed Lastname1"], - "firstName": ["Hashed FirstName", "Hashed FirstName1"], - "address": { - "city": ["Hashed City", "Hashed City1"], - "state": ["Hashed State", "Hashed State1"], - "zip": ["Hashed Zip", "Hashed Zip1"], - "country": ["Hashed country", "Hashed country1"] - } - }, - "device": { - "adTrackingEnabled": false, - "advertisingId": "Hashed maids" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": false, - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "name": "Test Tool", - "type": "page", - "sentAt": "2023-02-01T00:00:00.379Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "version": "2.22.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://www.abc.com/s598907", - "path": "/test-path/s598907", - "title": "Test Tool + Reviews | Rudderstack", - "search": "", - "tab_url": "https://www.abc.com/s598907", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1024, - "height": 1024, - "density": 1, - "innerWidth": 1024, - "innerHeight": 1024 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.22.3" - }, - "campaign": {}, - "doNotSell": false, - "sessionId": 1675209600203, - "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/109.0.5414.101 Safari/537.36", - "gaClientId": { - "integrations": { - "Google Ads": { - "gclid": "" - }, - "Google Analytics": { - "clientId": "1518934611.1234569600" - } - } - }, - "sessionStart": true - }, - "rudderId": "7291a10f-e7dd-49f9-94ce-0154f53897y6", - "messageId": "1c77a616-13a7-4a2e-a8e7-e1a0971897y6", - "timestamp": "2023-02-01T12:47:30.030Z", - "properties": { - "sku": "45790-32", - "url": "https://www.abc.com/23rty", - "name": "Test Tool", - "path": "/test-path/tool", - "email": "", - "title": "Test Tool + Reviews | Rudderstack", - "review": { - "reviewCount": 2, - "averageReview": 5, - "reviewContentID": ["238300132"] - }, - "search": "", - "tab_url": "https://www.abc/com", - "pageInfo": { - "pageId": "s592897", - "category": { - "pageType": "product", - "subCategory": "Dining & Kitchen Furniture", - "pageTemplate": "product detail grouper", - "primaryCategory": "Furniture" - }, - "brandType": "new brand" - }, - "referrer": "", - "subCategory": "Dining & Kitchen Furniture", - "primaryCategory": "Furniture", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "receivedAt": "2023-02-01T12:47:30.038Z", - "request_ip": "66.249.72.218", - "anonymousId": "a61c77a6-1613-474a-aee8-e7e1a0971047", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-02-01T00:00:00.371Z" - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123478671210", - "sendingUnHashedData": false, - "enableDeduplication": false, - "eventsMapping": [ - { - "from": "Product Added", - "to": "AddToCart" - }, - { - "from": "Order Completed", - "to": "Checkout" - }, - { - "from": "Product Viewed", - "to": "PageVisit" - }, - { - "from": "Lead", - "to": "Lead" - }, - { - "from": "Signup", - "to": "Signup" - } - ], - "enhancedMatch": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "test", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "sku": "1234", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "sku": "1234", - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - } - ] - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "advertiserId": "123456", - "appId": "429047995", - "sendingUnHashedData": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "enhancedMatch": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Track call with v5 Api version and send external_id toggle enabled", - "message": { - "type": "track", - "event": "ABC Searched", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendExternalId": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Custom event with v5 Api version", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Custom event with v5 Api version, with unhashed User Data and the values are an array of strings", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": ["abc@gmail.com", "def@gmail.com"], - "phone": ["+1234589947", "+1234589948"], - "ge": ["male", "male"], - "db": ["19950715", "19970615"], - "lastname": ["Rudderlabs", "Xu"], - "firstName": ["Test", "Alex"], - "address": { - "city": ["Kolkata", "Mumbai"], - "state": ["WB", "MH"], - "zip": ["700114", "700115"], - "country": ["IN", "IN"] - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "optOutType": "LDP", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Ad Account Id check in V5", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "description": "Conversion Token check in V5", - "message": { - "type": "track", - "event": "random", - "sentAt": "2020-08-14T05:30:30.118Z", - "channel": "web", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": true, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "message": { - "type": "track", - "event": "custom event", - "channel": "web", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "userAgent": "chrome", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "email": "abc@gmail.com", - "phone": "+1234589947", - "ge": "male", - "db": "19950715", - "lastname": "Rudderlabs", - "firstName": "Test", - "address": { - "city": "Kolkata", - "state": "WB", - "zip": "700114", - "country": "IN" - } - }, - "device": { - "advertisingId": "abc123" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "requestIP": "123.0.0.0", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "All": true - } - }, - "destination": { - "ID": "1pYpzzvcn7AQ2W9GGIAZSsN6Mfq", - "Name": "PINTEREST_TAG", - "Config": { - "sendAsTestEvent": false, - "tagId": "123456789", - "apiVersion": "newApi", - "adAccountId": "accountId123", - "conversionToken": "conversionToken123", - "appId": "429047995", - "enhancedMatch": true, - "enableDeduplication": true, - "deduplicationKey": "messageId", - "sendingUnHashedData": true, - "sendAsCustomEvent": false, - "customProperties": [ - { - "properties": "presentclass" - }, - { - "properties": "presentgrade" - } - ], - "eventsMapping": [ - { - "from": "ABC Searched", - "to": "WatchVideo" - } - ] - }, - "Enabled": true, - "Transformations": [] - } - } -] diff --git a/test/__tests__/data/pinterest_tag_step_output.json b/test/__tests__/data/pinterest_tag_step_output.json deleted file mode 100644 index d364bf82dc..0000000000 --- a/test/__tests__/data/pinterest_tag_step_output.json +++ /dev/null @@ -1,911 +0,0 @@ -[ - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "watch_video", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome", - "ge": ["1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9"] - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "checkout", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "add_to_cart", - "action_source": "web", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 2, - "content_ids": ["123"], - "contents": [ - { - "quantity": 2, - "item_price": "25" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Advertiser Id not found. Aborting" - }, - { - "statusCode": 400, - "error": "It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "watch_video", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "num_items": 2, - "order_id": "50314b8e9bcf000000000000", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Advertiser Id not found. Aborting" - }, - { - "statusCode": 400, - "error": "message type group is not supported" - }, - { - "statusCode": 400, - "error": "Action source must be one of app_android, app_ios, web, offline" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "action_source": "web", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "num_items": 2, - "order_id": "50314b8e9bcf000000000000", - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "page_visit", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "opt_out": false, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "opt_out": true, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "action_source": "web", - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "client_ip_address": "127.0.0.0", - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "action_source": "web", - "opt_out": true, - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "user_data": { - "ph": ["Hashed phone"], - "db": ["Hashed DB"], - "ln": ["Hashed Lastname"], - "fn": ["Hashed FirstName"], - "ct": ["Hashed City"], - "st": ["Hashed State"], - "zp": ["Hashed Zip"], - "country": ["Hashed country"], - "hashed_maids": ["Hashed maids"], - "ge": ["Hashed Gender"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_time": 1597383030, - "action_source": "web", - "opt_out": true, - "event_name": "view_category", - "app_id": "429047995", - "advertiser_id": "123456", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "user_data": { - "ph": ["Hashed phone", "Hashed phone1"], - "db": ["Hashed DB", "Hashed DB1"], - "ln": ["Hashed Lastname", "Hashed Lastname1"], - "fn": ["Hashed FirstName", "Hashed FirstName1"], - "ct": ["Hashed City", "Hashed City1"], - "st": ["Hashed State", "Hashed State1"], - "zp": ["Hashed Zip", "Hashed Zip1"], - "country": ["Hashed country", "Hashed country1"], - "hashed_maids": ["Hashed maids"], - "ge": ["Hashed Gender", "Hashed Gender1"], - "client_user_agent": "chrome" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "body": { - "JSON": { - "event_time": 1675255650, - "event_source_url": "https://www.abc.com/s598907", - "action_source": "web", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "2.22.3", - "language": "en-US", - "event_id": "1c77a616-13a7-4a2e-a8e7-e1a0971897y6", - "advertiser_id": "123478671210", - "user_data": { - "client_ip_address": "66.249.72.218", - "client_user_agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/109.0.5414.101 Safari/537.36" - }, - "event_name": "page_visit" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 0, - "content_ids": ["1234"], - "contents": [ - { - "quantity": 1, - "item_price": "undefined" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://ct.pinterest.com/events/v3", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "event_name": "custom", - "event_time": 1597383030, - "action_source": "web", - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "advertiser_id": "123456", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "num_items": 1, - "content_ids": ["507f1f77bcf86cd799439011"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "action_source": "web", - "advertiser_id": "123456", - "app_id": "429047995", - "custom_data": { - "contents": [{ "item_price": "undefined", "quantity": 1 }], - "currency": "USD", - "num_items": 0, - "order_id": "50314b8e9bcf000000000000", - "value": "27.5" - }, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_name": "custom event", - "event_time": 1597383030, - "user_data": { - "client_user_agent": "chrome", - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"] - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://ct.pinterest.com/events/v3", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "watch_video", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome", - "external_id": ["3217d71a74c219d6e31e28267b313a7ceb6a2c032db1a091c9416b25b2ae2bc8"] - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": ["48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08"], - "ph": ["d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b"], - "ln": ["dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251"], - "fn": ["9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"], - "ct": ["6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85"], - "st": ["3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd"], - "zp": ["1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c"], - "country": ["582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf"], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.pinterest.com/v5/ad_accounts/accountId123/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer conversionToken123" - }, - "params": {}, - "body": { - "JSON": { - "action_source": "web", - "event_name": "custom", - "event_time": 1597383030, - "event_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "app_id": "429047995", - "user_data": { - "em": [ - "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "c392e50ebeca7bea4405e9c545023451ac56620031f81263f681269bde14218b" - ], - "ph": [ - "d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b", - "22bdde2594851294f2a6f4c34af704e68b398b03129ea9ceb58f0ffe33f6db52" - ], - "ln": [ - "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "9c2f138690fca4890c3c4a6691610fbbbdf32091cc001f7355cfdf574baa52b9" - ], - "fn": [ - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "4135aa9dc1b842a653dea846903ddb95bfb8c5a10c504a7fa16e10bc31d1fdf0" - ], - "ct": [ - "6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85", - "d209bcc17778fd19fd2bc0c99a3868bf011da5162d3a75037a605768ebc276e2" - ], - "st": [ - "3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd", - "1b0316ed1cfed044035c55363e02ccafab26d66b1c2746b94d17285f043324aa" - ], - "zp": [ - "1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c", - "4d6755aa1e85517191f06cc91448696c173e1195ae51f94a1670116ac7b5c47b" - ], - "country": [ - "582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf", - "582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf" - ], - "hashed_maids": ["6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090"], - "client_user_agent": "chrome" - }, - "custom_data": { - "currency": "USD", - "value": "27.5", - "order_id": "50314b8e9bcf000000000000", - "opt_out_type": "LDP", - "num_items": 3, - "content_ids": ["507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"], - "contents": [ - { - "quantity": 1, - "item_price": "19" - }, - { - "quantity": 2, - "item_price": "3" - } - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Ad Account ID not found. Aborting" - }, - { - "statusCode": 400, - "error": "Conversion Token not found. Aborting" - }, - { - "statusCode": 400, - "error": "custom event is not mapped in UI. Make sure to map the event in UI or enable the 'send as custom event' setting" - } -] diff --git a/test/__tests__/pinterestConversion-cdk.test.ts b/test/__tests__/pinterestConversion-cdk.test.ts deleted file mode 100644 index 2afde331d5..0000000000 --- a/test/__tests__/pinterestConversion-cdk.test.ts +++ /dev/null @@ -1,135 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import { executeWorkflow, getWorkflowEngine, processCdkV2Workflow } from '../../src/cdk/v2/handler'; -import tags from '../../src/v0/util/tags'; -import logger from '../../src/logger'; - -const integration = 'pinterest_tag'; -const name = 'Pinterest Conversion API'; - -describe(`${name} Tests`, () => { - describe('Processor Tests', () => { - const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`), - { encoding: 'utf8' }, - ); - const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`), - { encoding: 'utf8' }, - ); - const inputData = JSON.parse(inputDataFile); - const expectedData = JSON.parse(outputDataFile); - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - const expected = expectedData[index]; - try { - const output = await processCdkV2Workflow( - integration, - input, - tags.FEATURES.PROCESSOR, - logger, - ); - expect(output).toEqual(expected); - } catch (error: any) { - expect(error.message).toEqual(expected.error); - } - }); - }); - }); - - describe('Processor Step Tests', () => { - const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`), - { encoding: 'utf8' }, - ); - const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`), - { encoding: 'utf8' }, - ); - const inputData = JSON.parse(inputDataFile); - const expectedData = JSON.parse(outputDataFile); - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - const expected = expectedData[index]; - try { - const output = await processCdkV2Workflow( - integration, - input, - tags.FEATURES.PROCESSOR, - logger, - ); - expect(output).toEqual(expected); - } catch (error: any) { - expect(error.message).toEqual(expected.error); - } - }); - }); - }); - - describe('Router Tests', () => { - // Router Test Data - const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`), - { encoding: 'utf8' }, - ); - - const inputRouterErrorDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_error_input.json`), - { encoding: 'utf8' }, - ); - - const outputRouterBatchDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_batch_output.json`), - { encoding: 'utf8' }, - ); - const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`), - { encoding: 'utf8' }, - ); - const outputRouterErrorDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_error_output.json`), - { encoding: 'utf8' }, - ); - const inputRouterData = JSON.parse(inputRouterDataFile); - const inputRouterErrorData = JSON.parse(inputRouterErrorDataFile); - - const expectedRouterBatchData = JSON.parse(outputRouterBatchDataFile); - const expectedRouterData = JSON.parse(outputRouterDataFile); - const expectedRouterErrorData = JSON.parse(outputRouterErrorDataFile); - - it('Payload with error input', async () => { - const output = await processCdkV2Workflow( - integration, - inputRouterErrorData, - tags.FEATURES.ROUTER, - logger, - ); - expect(output).toEqual(expectedRouterErrorData); - }); - - describe('Default Batch size', () => { - inputRouterData.forEach((input, index) => { - it(`Payload: ${index}`, async () => { - const output = await processCdkV2Workflow( - integration, - input, - tags.FEATURES.ROUTER, - logger, - ); - expect(output).toEqual(expectedRouterData[index]); - }); - }); - }); - describe('Batch size 3', () => { - inputRouterData.forEach((input, index) => { - it(`Payload: ${index}`, async () => { - const workflowEngine = await getWorkflowEngine(integration, tags.FEATURES.ROUTER, { - MAX_BATCH_SIZE: 3, - }); - const output = await executeWorkflow(workflowEngine, input); - expect(output).toEqual(expectedRouterBatchData[index]); - }); - }); - }); - }); -}); diff --git a/test/__tests__/pinterestConversion.test.js b/test/__tests__/pinterestConversion.test.js deleted file mode 100644 index 4c145f0383..0000000000 --- a/test/__tests__/pinterestConversion.test.js +++ /dev/null @@ -1,54 +0,0 @@ -const integration = "pinterest_tag"; -const name = "Pinterest Conversion API"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const { assertRouterOutput } = require('../testHelper'); - -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - inputRouterData.forEach((input, index) => { - it(`Payload: ${index}`, async () => { - let output = await transformer.processRouterDest(input); - assertRouterOutput(output, input); - expect(output).toEqual(expectedRouterData[index]); - }); - }); - }); -}); diff --git a/test/apitests/data_scenarios/destination/proc/batch_input_multiplex.json b/test/apitests/data_scenarios/destination/proc/batch_input_multiplex.json index 7dd8984f28..3ce7c15091 100644 --- a/test/apitests/data_scenarios/destination/proc/batch_input_multiplex.json +++ b/test/apitests/data_scenarios/destination/proc/batch_input_multiplex.json @@ -78,6 +78,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -254,6 +255,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", diff --git a/test/apitests/data_scenarios/destination/proc/multiplex_failure.json b/test/apitests/data_scenarios/destination/proc/multiplex_failure.json index dc9919fb1a..68c7fc3baa 100644 --- a/test/apitests/data_scenarios/destination/proc/multiplex_failure.json +++ b/test/apitests/data_scenarios/destination/proc/multiplex_failure.json @@ -77,6 +77,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -206,13 +207,13 @@ "destinationDefinitionId": "" }, "statusCode": 400, - "error": "Missing required value from [\"traits.action_source\",\"context.traits.action_source\",\"traits.actionSource\",\"context.traits.actionSource\",\"properties.action_source\",\"properties.actionSource\",\"channel\"]", + "error": "action_source is required: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: action_source is required", "statTags": { "errorCategory": "dataValidation", "errorType": "instrumentation", "destType": "PINTEREST_TAG", "module": "destination", - "implementation": "native", + "implementation": "cdkV2", "feature": "processor", "destinationId": "2JIqVoWNvSOHa9ppKOqSo4hPuc0", "workspaceId": "27O0bhB6p5ehfOWeeZlOSsSDTLg" diff --git a/test/apitests/data_scenarios/destination/proc/multiplex_partial_failure.json b/test/apitests/data_scenarios/destination/proc/multiplex_partial_failure.json index 63194f1b87..0e467c26d0 100644 --- a/test/apitests/data_scenarios/destination/proc/multiplex_partial_failure.json +++ b/test/apitests/data_scenarios/destination/proc/multiplex_partial_failure.json @@ -78,6 +78,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -254,6 +255,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -543,13 +545,13 @@ "destinationDefinitionId": "" }, "statusCode": 400, - "error": "Action source must be one of app_android, app_ios, web, offline", + "error": "Action source must be one of app_android, app_ios, web, offline: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: Action source must be one of app_android, app_ios, web, offline", "statTags": { "errorCategory": "dataValidation", "errorType": "instrumentation", "destType": "PINTEREST_TAG", "module": "destination", - "implementation": "native", + "implementation": "cdkV2", "feature": "processor", "destinationId": "2JIqVoWNvSOHa9ppKOqSo4hPuc0", "workspaceId": "27O0bhB6p5ehfOWeeZlOSsSDTLg" diff --git a/test/apitests/data_scenarios/destination/proc/multiplex_success.json b/test/apitests/data_scenarios/destination/proc/multiplex_success.json index bf1b1aae81..66b6c870a9 100644 --- a/test/apitests/data_scenarios/destination/proc/multiplex_success.json +++ b/test/apitests/data_scenarios/destination/proc/multiplex_success.json @@ -78,6 +78,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", diff --git a/test/apitests/data_scenarios/destination/router/failure_test.json b/test/apitests/data_scenarios/destination/router/failure_test.json index 96c5cff54f..9e36da50cb 100644 --- a/test/apitests/data_scenarios/destination/router/failure_test.json +++ b/test/apitests/data_scenarios/destination/router/failure_test.json @@ -141,6 +141,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -378,6 +379,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -615,6 +617,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -991,6 +994,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", @@ -1192,7 +1196,7 @@ "errorType": "instrumentation", "destType": "PINTEREST_TAG", "module": "destination", - "implementation": "native", + "implementation": "cdkV2", "feature": "router", "destinationId": "2JIqVoWNvSOHa9ppKOqSo4hPuc0", "workspaceId": "27O0bhB6p5ehfOWeeZlOSsSDTLg" @@ -1206,6 +1210,7 @@ "DisplayName": "Pinterest Tag", "Config": { "cdkV2TestThreshold": 1, + "cdkV2Enabled": true, "destConfig": { "defaultConfig": [ "tagId", diff --git a/test/apitests/service.api.test.ts b/test/apitests/service.api.test.ts index 30d2c568a6..2a0db6978e 100644 --- a/test/apitests/service.api.test.ts +++ b/test/apitests/service.api.test.ts @@ -449,7 +449,6 @@ describe('Destination api tests', () => { expect(response.status).toEqual(200); expect(JSON.parse(response.text)).toEqual(data.output); }); - test('(webhook) success snceario for batch of input', async () => { const data = getDataFromPath('./data_scenarios/destination/proc/batch_input.json'); const response = await request(server) diff --git a/test/integrations/destinations/pinterest_tag/processor/data.ts b/test/integrations/destinations/pinterest_tag/processor/data.ts index 48b624645f..b856d247d7 100644 --- a/test/integrations/destinations/pinterest_tag/processor/data.ts +++ b/test/integrations/destinations/pinterest_tag/processor/data.ts @@ -26,13 +26,21 @@ export const data = [ lastname: 'Rudderlabs', firstName: 'Test', address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + partnerId: '12345678', }, device: { advertisingId: 'abc123' }, library: { name: 'rudder-sdk-ruby-sync', version: '1.0.6' }, + network: { + carrier: 'VI', + wifi: true, + }, }, messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', timestamp: '2020-08-14T05:30:30.118Z', properties: { + contentBrand: 'LV', + partnerName: 'testPartner', + contentName: 'testContent', tax: 2, total: 27.5, coupon: 'hasbros', @@ -106,55 +114,77 @@ export const data = [ { metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://ct.pinterest.com/events/v3', - headers: { 'Content-Type': 'application/json' }, - params: { test: true }, body: { + FORM: {}, JSON: { action_source: 'web', + advertiser_id: '429047995', + app_id: '429047995', + custom_data: { + content_brand: 'LV', + content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], + content_name: 'testContent', + contents: [ + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + item_price: '19', + quantity: 1, + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + item_price: '3', + quantity: 2, + }, + ], + currency: 'USD', + num_items: 3, + opt_out_type: 'LDP', + order_id: '50314b8e9bcf000000000000', + value: '27.5', + }, + device_carrier: 'VI', + event_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', event_name: 'watch_video', event_time: 1597383030, - event_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', - app_id: '429047995', - advertiser_id: '429047995', + partner_name: 'testPartner', user_data: { + click_id: 'dummy_clickId', + client_user_agent: 'chrome', + country: ['582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf'], + ct: ['6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85'], em: ['48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08'], - ph: ['d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b'], - ln: ['dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251'], fn: ['9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'], - ct: ['6689106ca7922c30b2fd2c175c85bc7fc2d52cc4941bdd7bb622c6cdc6284a85'], - st: ['3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd'], - zp: ['1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c'], - country: ['582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf'], + ge: ['1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9'], hashed_maids: [ '6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090', ], - client_user_agent: 'chrome', - click_id: 'dummy_clickId', - ge: ['1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9'], - }, - custom_data: { - currency: 'USD', - value: '27.5', - order_id: '50314b8e9bcf000000000000', - opt_out_type: 'LDP', - num_items: 3, - content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], - contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, - ], + ln: ['dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251'], + partner_id: '12345678', + ph: ['d164bbe036663cb5c96835e9ccc6501e9a521127ea62f6359744928ba932413b'], + st: ['3b45022ab36728cdae12e709e945bba267c50ee8a91e6e4388539a8e03a3fdcd'], + zp: ['1a4292e00780e18d00e76fde9850aee5344e939ba593333cd5e4b4aa2cd33b0c'], }, + wifi: true, }, JSON_ARRAY: {}, XML: {}, - FORM: {}, }, + endpoint: 'https://ct.pinterest.com/events/v3', files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + test: true, + }, + type: 'REST', userId: '', + version: '1', }, statusCode: 200, }, @@ -302,8 +332,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -835,8 +877,20 @@ export const data = [ order_id: '50314b8e9bcf000000000000', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1357,8 +1411,20 @@ export const data = [ order_id: '50314b8e9bcf000000000000', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -2486,7 +2552,15 @@ export const data = [ order_id: '50314b8e9bcf000000000000', num_items: 1, content_ids: ['507f1f77bcf86cd799439011'], - contents: [{ quantity: 1, item_price: '19' }], + contents: [ + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + ], }, }, JSON_ARRAY: {}, @@ -2785,8 +2859,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -2951,8 +3037,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -2980,7 +3078,7 @@ export const data = [ body: [ { description: - 'Custom event with v5 Api version, with unhashed User Data and the values are an array of strings', + 'Custom event with v5 Api version, with unhashed User Data and the values are an of strings', message: { type: 'track', event: 'random', @@ -3147,8 +3245,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, diff --git a/test/integrations/destinations/pinterest_tag/router/data.ts b/test/integrations/destinations/pinterest_tag/router/data.ts index c02b1781e3..c9ab29a45a 100644 --- a/test/integrations/destinations/pinterest_tag/router/data.ts +++ b/test/integrations/destinations/pinterest_tag/router/data.ts @@ -674,8 +674,20 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -710,8 +722,20 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -745,8 +769,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -812,8 +848,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -847,8 +895,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -981,7 +1041,7 @@ export const data = [ }, { destType: 'pinterest_tag', - description: 'Test 0', + description: 'Test 1', feature: 'router', module: 'destination', version: 'v0', @@ -1328,8 +1388,20 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1363,8 +1435,20 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1397,8 +1481,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1431,8 +1527,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1488,7 +1596,7 @@ export const data = [ }, { destType: 'pinterest_tag', - description: 'Test 0', + description: 'Test 2', feature: 'router', module: 'destination', version: 'v0', diff --git a/test/integrations/destinations/pinterest_tag/step/data.ts b/test/integrations/destinations/pinterest_tag/step/data.ts index cbd0b243bb..b607e3c9fa 100644 --- a/test/integrations/destinations/pinterest_tag/step/data.ts +++ b/test/integrations/destinations/pinterest_tag/step/data.ts @@ -75,6 +75,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -90,6 +91,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -101,6 +103,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -139,8 +144,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -232,6 +249,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -247,6 +265,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -258,6 +277,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -294,8 +316,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -368,6 +402,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -383,6 +418,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -394,6 +430,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -519,6 +558,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -534,6 +574,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -545,13 +586,17 @@ export const data = [ status: 200, body: [ { - error: 'Advertiser Id not found. Aborting', + error: + 'Advertiser Id not found. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Advertiser Id not found. Aborting', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'configuration', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -633,6 +678,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -648,6 +694,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -660,13 +707,16 @@ export const data = [ body: [ { error: - 'It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent', + 'It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent: Workflow: procWorkflow, Step: validateUserFields, ChildStep: undefined, OriginalError: It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -751,6 +801,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -766,6 +817,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -777,6 +829,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -813,8 +868,20 @@ export const data = [ order_id: '50314b8e9bcf000000000000', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -907,6 +974,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -922,6 +990,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -933,13 +1002,17 @@ export const data = [ status: 200, body: [ { - error: 'Advertiser Id not found. Aborting', + error: + 'Advertiser Id not found. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Advertiser Id not found. Aborting', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'configuration', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -1023,6 +1096,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1038,6 +1112,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1049,13 +1124,17 @@ export const data = [ status: 200, body: [ { - error: 'message type group is not supported', + error: + 'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -1140,6 +1219,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1155,6 +1235,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1166,13 +1247,17 @@ export const data = [ status: 200, body: [ { - error: 'Action source must be one of app_android, app_ios, web, offline', + error: + 'Action source must be one of app_android, app_ios, web, offline: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: Action source must be one of app_android, app_ios, web, offline', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -1257,6 +1342,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1273,6 +1359,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1284,6 +1371,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1320,8 +1410,20 @@ export const data = [ order_id: '50314b8e9bcf000000000000', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1378,6 +1480,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1393,6 +1496,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1404,6 +1508,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1488,6 +1595,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1503,6 +1611,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1514,6 +1623,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1598,6 +1710,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1613,6 +1726,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1624,6 +1738,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1709,6 +1826,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1724,6 +1842,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1735,6 +1854,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1821,6 +1943,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1834,6 +1957,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1845,6 +1969,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -1933,6 +2060,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -1946,6 +2074,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -1957,6 +2086,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -2096,6 +2228,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2114,6 +2247,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2125,6 +2259,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { body: { JSON: { @@ -2216,6 +2353,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2232,6 +2370,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2243,6 +2382,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -2360,6 +2502,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2376,6 +2519,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2387,6 +2531,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -2422,7 +2569,15 @@ export const data = [ order_id: '50314b8e9bcf000000000000', num_items: 1, content_ids: ['507f1f77bcf86cd799439011'], - contents: [{ quantity: 1, item_price: '19' }], + contents: [ + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + ], }, }, JSON_ARRAY: {}, @@ -2491,6 +2646,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2506,6 +2662,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2517,6 +2674,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { body: { FORM: {}, @@ -2644,6 +2804,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2662,6 +2823,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2673,6 +2835,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -2715,8 +2880,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -2810,6 +2987,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2828,6 +3006,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -2839,6 +3018,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -2878,8 +3060,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -2979,6 +3173,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -2997,6 +3192,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -3008,6 +3204,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST', @@ -3071,8 +3270,20 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + id: '507f1f77bcf86cd799439011', + item_category: 'Games', + item_name: 'Monopoly: 3rd Edition', + quantity: 1, + item_price: '19', + }, + { + id: '505bd76785ebb509fc183733', + item_category: 'Games', + item_name: 'Uno Card Game', + quantity: 2, + item_price: '3', + }, ], }, }, @@ -3129,6 +3340,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -3147,6 +3359,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -3158,13 +3371,17 @@ export const data = [ status: 200, body: [ { - error: 'Ad Account ID not found. Aborting', + error: + 'Ad Account ID not found. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Ad Account ID not found. Aborting', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'configuration', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -3213,6 +3430,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -3231,6 +3449,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -3242,13 +3461,17 @@ export const data = [ status: 200, body: [ { - error: 'Conversion Token not found. Aborting', + error: + 'Conversion Token not found. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Conversion Token not found. Aborting', + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, statTags: { destType: 'PINTEREST_TAG', errorCategory: 'dataValidation', errorType: 'configuration', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -3310,6 +3533,7 @@ export const data = [ destination: { ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'PINTEREST_TAG', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { sendAsTestEvent: false, tagId: '123456789', @@ -3328,6 +3552,7 @@ export const data = [ Enabled: true, Transformations: [], }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, }, ], method: 'POST', @@ -3339,6 +3564,9 @@ export const data = [ status: 200, body: [ { + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + }, output: { version: '1', type: 'REST',