@segment/action-destinations 3.337.2-staging.1 → 3.337.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +6 -2
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +7 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
- package/dist/destinations/aggregations-io/generated-types.d.ts +4 -0
- package/dist/destinations/aggregations-io/generated-types.js +3 -0
- package/dist/destinations/aggregations-io/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/index.d.ts +4 -0
- package/dist/destinations/aggregations-io/index.js +58 -0
- package/dist/destinations/aggregations-io/index.js.map +1 -0
- package/dist/destinations/aggregations-io/send/generated-types.d.ts +7 -0
- package/dist/destinations/aggregations-io/send/generated-types.js +3 -0
- package/dist/destinations/aggregations-io/send/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/send/index.d.ts +5 -0
- package/dist/destinations/aggregations-io/send/index.js +44 -0
- package/dist/destinations/aggregations-io/send/index.js.map +1 -0
- package/dist/destinations/aggregations-io/types.d.ts +8 -0
- package/dist/destinations/aggregations-io/types.js +8 -0
- package/dist/destinations/aggregations-io/types.js.map +1 -0
- package/dist/destinations/airship/registerAndAssociate/generated-types.d.ts +3 -0
- package/dist/destinations/airship/registerAndAssociate/index.js +35 -7
- package/dist/destinations/airship/registerAndAssociate/index.js.map +1 -1
- package/dist/destinations/airship/utilities.d.ts +3 -1
- package/dist/destinations/airship/utilities.js +84 -41
- package/dist/destinations/airship/utilities.js.map +1 -1
- package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/conversionEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/index.js +7 -0
- package/dist/destinations/algolia-insights/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productAddedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productClickedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productViewedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
- package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
- package/dist/destinations/amazon-ads/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/index.d.ts +4 -0
- package/dist/destinations/amazon-ads/index.js +87 -0
- package/dist/destinations/amazon-ads/index.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
- package/dist/destinations/amazon-ads/types.d.ts +22 -0
- package/dist/destinations/amazon-ads/types.js +11 -0
- package/dist/destinations/amazon-ads/types.js.map +1 -0
- package/dist/destinations/avo/generated-types.d.ts +5 -0
- package/dist/destinations/avo/generated-types.js +3 -0
- package/dist/destinations/avo/generated-types.js.map +1 -0
- package/dist/destinations/avo/index.d.ts +4 -0
- package/dist/destinations/avo/index.js +54 -0
- package/dist/destinations/avo/index.js.map +1 -0
- package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.d.ts +9 -0
- package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.js +97 -0
- package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.js.map +1 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo-types.d.ts +26 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo-types.js +10 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo-types.js.map +1 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo.d.ts +3 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo.js +44 -0
- package/dist/destinations/avo/sendSchemaToInspector/avo.js.map +1 -0
- package/dist/destinations/avo/sendSchemaToInspector/generated-types.d.ts +11 -0
- package/dist/destinations/avo/sendSchemaToInspector/generated-types.js +3 -0
- package/dist/destinations/avo/sendSchemaToInspector/generated-types.js.map +1 -0
- package/dist/destinations/avo/sendSchemaToInspector/index.d.ts +5 -0
- package/dist/destinations/avo/sendSchemaToInspector/index.js +95 -0
- package/dist/destinations/avo/sendSchemaToInspector/index.js.map +1 -0
- package/dist/destinations/braze/index.js +12 -0
- package/dist/destinations/braze/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackEvent/index.js +8 -0
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackPurchase/index.js +8 -0
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
- package/dist/destinations/braze/utils.js +15 -11
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/courier/generated-types.d.ts +4 -0
- package/dist/destinations/courier/generated-types.js +3 -0
- package/dist/destinations/courier/generated-types.js.map +1 -0
- package/dist/destinations/courier/index.d.ts +4 -0
- package/dist/destinations/courier/index.js +44 -0
- package/dist/destinations/courier/index.js.map +1 -0
- package/dist/destinations/courier/postToCourier/generated-types.d.ts +5 -0
- package/dist/destinations/courier/postToCourier/generated-types.js +3 -0
- package/dist/destinations/courier/postToCourier/generated-types.js.map +1 -0
- package/dist/destinations/courier/postToCourier/index.d.ts +5 -0
- package/dist/destinations/courier/postToCourier/index.js +35 -0
- package/dist/destinations/courier/postToCourier/index.js.map +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js +13 -2
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/devrev/createRevUser/index.js +9 -6
- package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
- package/dist/destinations/devrev/utils/types.d.ts +9 -0
- package/dist/destinations/display-video-360/index.js +6 -1
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/display-video-360/properties.js +4 -4
- package/dist/destinations/display-video-360/properties.js.map +1 -1
- package/dist/destinations/display-video-360/proto/protofile.d.ts +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js.map +1 -1
- package/dist/destinations/display-video-360/shared.d.ts +2 -0
- package/dist/destinations/display-video-360/shared.js +8 -1
- package/dist/destinations/display-video-360/shared.js.map +1 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +2 -5
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +18 -98
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +9 -3
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -3
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +8 -2
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/EngageStats.js +0 -4
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
- package/dist/destinations/equals/generated-types.d.ts +3 -0
- package/dist/destinations/equals/generated-types.js +3 -0
- package/dist/destinations/equals/generated-types.js.map +1 -0
- package/dist/destinations/equals/index.d.ts +4 -0
- package/dist/destinations/equals/index.js +38 -0
- package/dist/destinations/equals/index.js.map +1 -0
- package/dist/destinations/equals/send/generated-types.d.ts +5 -0
- package/dist/destinations/equals/send/generated-types.js +3 -0
- package/dist/destinations/equals/send/generated-types.js.map +1 -0
- package/dist/destinations/equals/send/index.d.ts +5 -0
- package/dist/destinations/equals/send/index.js +38 -0
- package/dist/destinations/equals/send/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +3 -3
- package/dist/destinations/index.js +9 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/kameleoon/index.js +1 -1
- package/dist/destinations/kameleoon/index.js.map +1 -1
- package/dist/destinations/kevel/generated-types.d.ts +4 -0
- package/dist/destinations/kevel/generated-types.js +3 -0
- package/dist/destinations/kevel/generated-types.js.map +1 -0
- package/dist/destinations/kevel/index.d.ts +4 -0
- package/dist/destinations/kevel/index.js +45 -0
- package/dist/destinations/kevel/index.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/generated-types.d.ts +8 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js +3 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/index.d.ts +5 -0
- package/dist/destinations/kevel/syncAudience/index.js +64 -0
- package/dist/destinations/kevel/syncAudience/index.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/generated-types.d.ts +6 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js +3 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/index.d.ts +5 -0
- package/dist/destinations/kevel/syncTraits/index.js +39 -0
- package/dist/destinations/kevel/syncTraits/index.js.map +1 -0
- package/dist/destinations/klaviyo/properties.js +1 -1
- package/dist/destinations/klaviyo/properties.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js +43 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
- package/dist/destinations/linkedin-conversions/api/api.test.js +43 -25
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +3 -2
- package/dist/destinations/linkedin-conversions/api/index.js +41 -15
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/constants.d.ts +1 -1
- package/dist/destinations/linkedin-conversions/constants.js +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +27 -6
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +15 -7
- package/dist/destinations/linkedin-conversions/types.js.map +1 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.js +7 -7
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js +129 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js +69 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.d.ts +8 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js +3 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/index.d.ts +5 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js +84 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js.map +1 -0
- package/dist/destinations/mixpanel/index.js +3 -1
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +4 -0
- package/dist/destinations/moengage/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/moengage/trackEvent/index.js +10 -2
- package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/responsys/generated-types.d.ts +15 -0
- package/dist/destinations/responsys/index.js +141 -6
- package/dist/destinations/responsys/index.js.map +1 -1
- package/dist/destinations/responsys/sendAudience/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/sendAudience/generated-types.js +3 -0
- package/dist/destinations/responsys/sendAudience/generated-types.js.map +1 -0
- package/dist/destinations/responsys/sendAudience/index.d.ts +5 -0
- package/dist/destinations/responsys/sendAudience/index.js +88 -0
- package/dist/destinations/responsys/sendAudience/index.js.map +1 -0
- package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +9 -0
- package/dist/destinations/responsys/sendCustomTraits/generated-types.js +3 -0
- package/dist/destinations/responsys/sendCustomTraits/generated-types.js.map +1 -0
- package/dist/destinations/responsys/sendCustomTraits/index.d.ts +5 -0
- package/dist/destinations/responsys/sendCustomTraits/index.js +52 -0
- package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -0
- package/dist/destinations/responsys/shared_properties.d.ts +3 -0
- package/dist/destinations/responsys/shared_properties.js +19 -0
- package/dist/destinations/responsys/shared_properties.js.map +1 -0
- package/dist/destinations/responsys/types.d.ts +23 -22
- package/dist/destinations/responsys/upsertListMember/generated-types.d.ts +13 -0
- package/dist/destinations/responsys/upsertListMember/generated-types.js +3 -0
- package/dist/destinations/responsys/upsertListMember/generated-types.js.map +1 -0
- package/dist/destinations/responsys/upsertListMember/index.d.ts +5 -0
- package/dist/destinations/responsys/upsertListMember/index.js +80 -0
- package/dist/destinations/responsys/upsertListMember/index.js.map +1 -0
- package/dist/destinations/responsys/utils.d.ts +18 -0
- package/dist/destinations/responsys/utils.js +161 -0
- package/dist/destinations/responsys/utils.js.map +1 -0
- package/dist/destinations/schematic/generated-types.d.ts +3 -0
- package/dist/destinations/schematic/generated-types.js +3 -0
- package/dist/destinations/schematic/generated-types.js.map +1 -0
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +18 -0
- package/dist/destinations/schematic/identifyUser/generated-types.js +3 -0
- package/dist/destinations/schematic/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/schematic/identifyUser/index.d.ts +5 -0
- package/dist/destinations/schematic/identifyUser/index.js +114 -0
- package/dist/destinations/schematic/identifyUser/index.js.map +1 -0
- package/dist/destinations/schematic/index.d.ts +4 -0
- package/dist/destinations/schematic/index.js +58 -0
- package/dist/destinations/schematic/index.js.map +1 -0
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +13 -0
- package/dist/destinations/schematic/trackEvent/generated-types.js +3 -0
- package/dist/destinations/schematic/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/schematic/trackEvent/index.d.ts +5 -0
- package/dist/destinations/schematic/trackEvent/index.js +89 -0
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -0
- package/dist/destinations/segment/generated-types.d.ts +0 -1
- package/dist/destinations/segment/index.js +3 -13
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/properties.d.ts +1 -1
- package/dist/destinations/segment/properties.js +3 -3
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/index.js +40 -15
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/index.js +40 -15
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/index.js +48 -15
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/index.js +41 -15
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/index.js +44 -15
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/stackadapt/forwardEvent/generated-types.d.ts +33 -0
- package/dist/destinations/stackadapt/forwardEvent/generated-types.js +3 -0
- package/dist/destinations/stackadapt/forwardEvent/generated-types.js.map +1 -0
- package/dist/destinations/stackadapt/forwardEvent/index.d.ts +5 -0
- package/dist/destinations/stackadapt/forwardEvent/index.js +273 -0
- package/dist/destinations/stackadapt/forwardEvent/index.js.map +1 -0
- package/dist/destinations/stackadapt/generated-types.d.ts +3 -0
- package/dist/destinations/stackadapt/generated-types.js +3 -0
- package/dist/destinations/stackadapt/generated-types.js.map +1 -0
- package/dist/destinations/stackadapt/index.d.ts +4 -0
- package/dist/destinations/stackadapt/index.js +38 -0
- package/dist/destinations/stackadapt/index.js.map +1 -0
- package/dist/destinations/surveysparrow/createContact/generated-types.d.ts +10 -0
- package/dist/destinations/surveysparrow/createContact/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/createContact/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/createContact/index.d.ts +5 -0
- package/dist/destinations/surveysparrow/createContact/index.js +105 -0
- package/dist/destinations/surveysparrow/createContact/index.js.map +1 -0
- package/dist/destinations/surveysparrow/generated-types.d.ts +3 -0
- package/dist/destinations/surveysparrow/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/index.d.ts +4 -0
- package/dist/destinations/surveysparrow/index.js +40 -0
- package/dist/destinations/surveysparrow/index.js.map +1 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.d.ts +10 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.d.ts +8 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.js +165 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions/index.js +3 -92
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +24 -33
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +4 -12
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +40 -113
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.js +244 -0
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions-sandbox/formatter.js +43 -0
- package/dist/destinations/tiktok-conversions-sandbox/formatter.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.js +3 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.js +247 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js +3 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.d.ts +5 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js +16 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.js +65 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
- package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
- package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +156 -153
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +3 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +4 -305
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js +244 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.d.ts +4 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.d.ts +4 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js +251 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js +68 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js.map +1 -0
- package/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/dist/destinations/webhook-audiences/index.js +1 -3
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/index.js +9 -1
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +6 -2
- package/dist/destinations/yahoo-audiences/updateSegment/index.js +36 -11
- package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-rt.js +3 -3
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
- package/package.json +3 -3
|
@@ -27,11 +27,10 @@ const action = {
|
|
|
27
27
|
'@path': '$.timestamp'
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
phone_number: {
|
|
31
31
|
label: 'Phone Number',
|
|
32
32
|
description: 'Phone number of the user who triggered the conversion event, in E.164 standard format, e.g. +14150000000. Segment will hash this value before sending to TikTok.',
|
|
33
33
|
type: 'string',
|
|
34
|
-
multiple: true,
|
|
35
34
|
default: {
|
|
36
35
|
'@if': {
|
|
37
36
|
exists: { '@path': '$.properties.phone' },
|
|
@@ -40,12 +39,11 @@ const action = {
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
},
|
|
43
|
-
|
|
42
|
+
email: {
|
|
44
43
|
label: 'Email',
|
|
45
44
|
description: 'Email address of the user who triggered the conversion event. Segment will hash this value before sending to TikTok.',
|
|
46
45
|
type: 'string',
|
|
47
46
|
format: 'email',
|
|
48
|
-
multiple: true,
|
|
49
47
|
default: {
|
|
50
48
|
'@if': {
|
|
51
49
|
exists: { '@path': '$.properties.email' },
|
|
@@ -54,11 +52,10 @@ const action = {
|
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
},
|
|
57
|
-
|
|
55
|
+
external_id: {
|
|
58
56
|
label: 'External ID',
|
|
59
57
|
description: 'Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok.',
|
|
60
58
|
type: 'string',
|
|
61
|
-
multiple: true,
|
|
62
59
|
default: {
|
|
63
60
|
'@if': {
|
|
64
61
|
exists: { '@path': '$.userId' },
|
|
@@ -79,18 +76,6 @@ const action = {
|
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
},
|
|
82
|
-
ttp: {
|
|
83
|
-
label: 'TikTok Cookie ID',
|
|
84
|
-
description: 'TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the `_ttp` cookie. The value of `_ttp` is used to match website visitor events with TikTok ads. You can extract the value of `_ttp` and attach the value here. To learn more about the `ttp` parameter, refer to [Events API 2.0 - Send TikTok Cookie](https://ads.tiktok.com/marketing_api/docs?id=%201771100936446977) (`_ttp`).',
|
|
85
|
-
type: 'string',
|
|
86
|
-
default: {
|
|
87
|
-
'@if': {
|
|
88
|
-
exists: { '@path': '$.properties.ttp' },
|
|
89
|
-
then: { '@path': '$.properties.ttp' },
|
|
90
|
-
else: { '@path': '$.integrations.TikTok Pixel.ttp' }
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
79
|
lead_id: {
|
|
95
80
|
label: 'TikTok Lead ID',
|
|
96
81
|
description: 'ID of TikTok leads. Every lead will have its own lead_id when exported from TikTok. This feature is in Beta. Please contact your TikTok representative to inquire regarding availability',
|
|
@@ -103,14 +88,6 @@ const action = {
|
|
|
103
88
|
}
|
|
104
89
|
}
|
|
105
90
|
},
|
|
106
|
-
locale: {
|
|
107
|
-
label: 'Locale',
|
|
108
|
-
description: 'The BCP 47 language identifier. For reference, refer to the [IETF BCP 47 standardized code](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).',
|
|
109
|
-
type: 'string',
|
|
110
|
-
default: {
|
|
111
|
-
'@path': '$.context.locale'
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
91
|
url: {
|
|
115
92
|
label: 'Page URL',
|
|
116
93
|
type: 'string',
|
|
@@ -159,35 +136,18 @@ const action = {
|
|
|
159
136
|
description: 'Number of items.',
|
|
160
137
|
type: 'number'
|
|
161
138
|
},
|
|
162
|
-
|
|
163
|
-
label: 'Content
|
|
164
|
-
description: '
|
|
139
|
+
content_type: {
|
|
140
|
+
label: 'Content Type',
|
|
141
|
+
description: 'Type of the product item.',
|
|
165
142
|
type: 'string'
|
|
166
143
|
},
|
|
167
144
|
content_id: {
|
|
168
145
|
label: 'Content ID',
|
|
169
146
|
description: 'ID of the product item.',
|
|
170
147
|
type: 'string'
|
|
171
|
-
},
|
|
172
|
-
content_name: {
|
|
173
|
-
label: 'Content Name',
|
|
174
|
-
description: 'Name of the product item.',
|
|
175
|
-
type: 'string'
|
|
176
|
-
},
|
|
177
|
-
brand: {
|
|
178
|
-
label: 'Brand',
|
|
179
|
-
description: 'Brand name of the product item.',
|
|
180
|
-
type: 'string'
|
|
181
148
|
}
|
|
182
149
|
}
|
|
183
150
|
},
|
|
184
|
-
content_type: {
|
|
185
|
-
label: 'Content Type',
|
|
186
|
-
description: 'Type of the product item. When the `content_id` in the `contents` parameter is specified as `sku_id`, set this field to `product`. When the `content_id` in the `contents` parameter is specified as `item_group_id`, set this field to `product_group`.',
|
|
187
|
-
type: 'string',
|
|
188
|
-
choices: ['product', 'product_group'],
|
|
189
|
-
default: 'product'
|
|
190
|
-
},
|
|
191
151
|
currency: {
|
|
192
152
|
label: 'Currency',
|
|
193
153
|
type: 'string',
|
|
@@ -221,30 +181,6 @@ const action = {
|
|
|
221
181
|
'@path': '$.properties.query'
|
|
222
182
|
}
|
|
223
183
|
},
|
|
224
|
-
order_id: {
|
|
225
|
-
label: 'Order ID',
|
|
226
|
-
type: 'string',
|
|
227
|
-
description: 'Order ID of the transaction.',
|
|
228
|
-
default: {
|
|
229
|
-
'@path': '$.properties.order_id'
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
shop_id: {
|
|
233
|
-
label: 'Shop ID',
|
|
234
|
-
type: 'string',
|
|
235
|
-
description: 'Shop ID of the transaction.',
|
|
236
|
-
default: {
|
|
237
|
-
'@path': '$.properties.shop_id'
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
limited_data_use: {
|
|
241
|
-
label: 'Limited Data Use',
|
|
242
|
-
type: 'boolean',
|
|
243
|
-
description: 'Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to [Events API 2.0 - Limited Data Use](https://ads.tiktok.com/marketing_api/docs?id=1771101204435970).',
|
|
244
|
-
default: {
|
|
245
|
-
'@path': '$.properties.limited_data_use'
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
184
|
test_event_code: {
|
|
249
185
|
label: 'Test Event Code',
|
|
250
186
|
type: 'string',
|
|
@@ -253,9 +189,9 @@ const action = {
|
|
|
253
189
|
},
|
|
254
190
|
perform: (request, { payload, settings }) => {
|
|
255
191
|
const userData = {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
192
|
+
hashedExternalId: formatter_1.formatUserId(payload.external_id),
|
|
193
|
+
hashedEmail: formatter_1.formatEmail(payload.email),
|
|
194
|
+
hashedPhoneNumber: formatter_1.formatPhone(payload.phone_number)
|
|
259
195
|
};
|
|
260
196
|
let payloadUrl, urlTtclid;
|
|
261
197
|
if (payload.url) {
|
|
@@ -267,48 +203,39 @@ const action = {
|
|
|
267
203
|
}
|
|
268
204
|
if (payloadUrl)
|
|
269
205
|
urlTtclid = payloadUrl.searchParams.get('ttclid');
|
|
270
|
-
return request('https://business-api.tiktok.com/open_api/v1.3/
|
|
206
|
+
return request('https://business-api.tiktok.com/open_api/v1.3/pixel/track/', {
|
|
271
207
|
method: 'post',
|
|
272
208
|
json: {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
page: {
|
|
305
|
-
url: payload.url ? payload.url : undefined,
|
|
306
|
-
referrer: payload.referrer ? payload.referrer : undefined
|
|
307
|
-
},
|
|
308
|
-
limited_data_use: payload.limited_data_use ? payload.limited_data_use : false,
|
|
309
|
-
test_event_code: payload.test_event_code ? payload.test_event_code : undefined
|
|
310
|
-
}
|
|
311
|
-
]
|
|
209
|
+
pixel_code: settings.pixelCode,
|
|
210
|
+
event: payload.event,
|
|
211
|
+
event_id: payload.event_id ? `${payload.event_id}` : undefined,
|
|
212
|
+
timestamp: payload.timestamp,
|
|
213
|
+
test_event_code: payload.test_event_code,
|
|
214
|
+
context: {
|
|
215
|
+
user: {
|
|
216
|
+
external_id: userData.hashedExternalId,
|
|
217
|
+
phone_number: userData.hashedPhoneNumber,
|
|
218
|
+
email: userData.hashedEmail,
|
|
219
|
+
lead_id: payload.lead_id
|
|
220
|
+
},
|
|
221
|
+
ad: {
|
|
222
|
+
callback: payload.ttclid ? payload.ttclid : urlTtclid ? urlTtclid : undefined
|
|
223
|
+
},
|
|
224
|
+
page: {
|
|
225
|
+
url: payload.url,
|
|
226
|
+
referrer: payload.referrer
|
|
227
|
+
},
|
|
228
|
+
ip: payload.ip,
|
|
229
|
+
user_agent: payload.user_agent
|
|
230
|
+
},
|
|
231
|
+
properties: {
|
|
232
|
+
contents: payload.contents,
|
|
233
|
+
currency: payload.currency,
|
|
234
|
+
value: payload.value,
|
|
235
|
+
description: payload.description,
|
|
236
|
+
query: payload.query
|
|
237
|
+
},
|
|
238
|
+
partner_name: 'Segment'
|
|
312
239
|
}
|
|
313
240
|
});
|
|
314
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/index.ts"],"names":[],"mappings":";;AAGA,2CAAoE;AAEpE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,6JAA6J;IAC/J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;wBAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;qBACzB;oBACD,EAAE,EAAE;wBACF,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;qBAC9E;oBACD,IAAI,EAAE;wBACJ,GAAG,EAAE,OAAO,CAAC,GAAG;wBAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;qBAC3B;oBACD,EAAE,EAAE,OAAO,CAAC,EAAE;oBACd,UAAU,EAAE,OAAO,CAAC,UAAU;iBAC/B;gBACD,UAAU,EAAE;oBACV,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,WAAW,EAAE,OAAO,CAAC,WAAW;oBAChC,KAAK,EAAE,OAAO,CAAC,KAAK;iBACrB;gBACD,YAAY,EAAE,SAAS;aACxB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
event: {
|
|
6
|
+
label: 'Event Name',
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: true,
|
|
9
|
+
description: 'Conversion event name. Please refer to the "Supported Web Events" section on in TikTok’s [Events API documentation](https://ads.tiktok.com/marketing_api/docs?id=1701890979375106) for accepted event names.'
|
|
10
|
+
},
|
|
11
|
+
event_id: {
|
|
12
|
+
label: 'Event ID',
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Any hashed ID that can identify a unique user/session.',
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.messageId'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
timestamp: {
|
|
20
|
+
label: 'Event Timestamp',
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Timestamp that the event took place, in ISO 8601 format.',
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
phone_number: {
|
|
28
|
+
label: 'Phone Number',
|
|
29
|
+
description: 'A single phone number or array of phone numbers in E.164 standard format. Segment will hash this value before sending to TikTok. e.g. +14150000000. Segment will hash this value before sending to TikTok.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
multiple: true,
|
|
32
|
+
default: {
|
|
33
|
+
'@if': {
|
|
34
|
+
exists: { '@path': '$.properties.phone' },
|
|
35
|
+
then: { '@path': '$.properties.phone' },
|
|
36
|
+
else: { '@path': '$.context.traits.phone' }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
email: {
|
|
41
|
+
label: 'Email',
|
|
42
|
+
description: 'A single email address or an array of email addresses. Segment will hash this value before sending to TikTok.',
|
|
43
|
+
type: 'string',
|
|
44
|
+
multiple: true,
|
|
45
|
+
default: {
|
|
46
|
+
'@if': {
|
|
47
|
+
exists: { '@path': '$.properties.email' },
|
|
48
|
+
then: { '@path': '$.properties.email' },
|
|
49
|
+
else: { '@path': '$.context.traits.email' }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
order_id: {
|
|
54
|
+
label: 'Order ID',
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Order ID of the transaction.',
|
|
57
|
+
default: {
|
|
58
|
+
'@path': '$.properties.order_id'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
shop_id: {
|
|
62
|
+
label: 'Shop ID',
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Shop ID of the transaction.',
|
|
65
|
+
default: {
|
|
66
|
+
'@path': '$.properties.shop_id'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
external_id: {
|
|
70
|
+
label: 'External ID',
|
|
71
|
+
description: 'Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok. TikTok Conversions Destination supports both string and string[] types for sending external ID(s).',
|
|
72
|
+
type: 'string',
|
|
73
|
+
multiple: true,
|
|
74
|
+
default: {
|
|
75
|
+
'@if': {
|
|
76
|
+
exists: { '@path': '$.userId' },
|
|
77
|
+
then: { '@path': '$.userId' },
|
|
78
|
+
else: { '@path': '$.anonymousId' }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
ttclid: {
|
|
83
|
+
label: 'TikTok Click ID',
|
|
84
|
+
description: 'The value of the ttclid used to match website visitor events with TikTok ads. The ttclid is valid for 7 days. See [Set up ttclid](https://ads.tiktok.com/marketing_api/docs?rid=4eezrhr6lg4&id=1681728034437121) for details.',
|
|
85
|
+
type: 'string',
|
|
86
|
+
default: {
|
|
87
|
+
'@if': {
|
|
88
|
+
exists: { '@path': '$.properties.ttclid' },
|
|
89
|
+
then: { '@path': '$.properties.ttclid' },
|
|
90
|
+
else: { '@path': '$.integrations.TikTok Conversions.ttclid' }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
ttp: {
|
|
95
|
+
label: 'TikTok Cookie ID',
|
|
96
|
+
description: 'TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the `_ttp` cookie. The value of `_ttp` is used to match website visitor events with TikTok ads. You can extract the value of `_ttp` and attach the value here. To learn more about the `ttp` parameter, refer to [Events API 2.0 - Send TikTok Cookie](https://ads.tiktok.com/marketing_api/docs?id=%201771100936446977) (`_ttp`).',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: {
|
|
99
|
+
'@if': {
|
|
100
|
+
exists: { '@path': '$.properties.ttp' },
|
|
101
|
+
then: { '@path': '$.properties.ttp' },
|
|
102
|
+
else: { '@path': '$.integrations.TikTok Conversions.ttp' }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
lead_id: {
|
|
107
|
+
label: 'TikTok Lead ID',
|
|
108
|
+
description: 'ID of TikTok leads. Every lead will have its own lead_id when exported from TikTok. This feature is in Beta. Please contact your TikTok representative to inquire regarding availability',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: { '@path': '$.properties.lead_id' }
|
|
111
|
+
},
|
|
112
|
+
locale: {
|
|
113
|
+
label: 'Locale',
|
|
114
|
+
description: 'The BCP 47 language identifier. For reference, refer to the [IETF BCP 47 standardized code](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).',
|
|
115
|
+
type: 'string',
|
|
116
|
+
default: {
|
|
117
|
+
'@path': '$.context.locale'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
url: {
|
|
121
|
+
label: 'Page URL',
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'The page URL where the conversion event took place.',
|
|
124
|
+
default: {
|
|
125
|
+
'@path': '$.context.page.url'
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
referrer: {
|
|
129
|
+
label: 'Page Referrer',
|
|
130
|
+
type: 'string',
|
|
131
|
+
description: 'The page referrer.',
|
|
132
|
+
default: {
|
|
133
|
+
'@path': '$.context.page.referrer'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
ip: {
|
|
137
|
+
label: 'IP Address',
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'IP address of the browser.',
|
|
140
|
+
default: {
|
|
141
|
+
'@path': '$.context.ip'
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
user_agent: {
|
|
145
|
+
label: 'User Agent',
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'User agent from the user’s device.',
|
|
148
|
+
default: {
|
|
149
|
+
'@path': '$.context.userAgent'
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
contents: {
|
|
153
|
+
label: 'Contents',
|
|
154
|
+
type: 'object',
|
|
155
|
+
multiple: true,
|
|
156
|
+
description: 'Related item details for the event.',
|
|
157
|
+
properties: {
|
|
158
|
+
price: {
|
|
159
|
+
label: 'Price',
|
|
160
|
+
description: 'Price of the item.',
|
|
161
|
+
type: 'number'
|
|
162
|
+
},
|
|
163
|
+
quantity: {
|
|
164
|
+
label: 'Quantity',
|
|
165
|
+
description: 'Number of items.',
|
|
166
|
+
type: 'number'
|
|
167
|
+
},
|
|
168
|
+
content_category: {
|
|
169
|
+
label: 'Content Category',
|
|
170
|
+
description: 'Category of the product item.',
|
|
171
|
+
type: 'string'
|
|
172
|
+
},
|
|
173
|
+
content_id: {
|
|
174
|
+
label: 'Content ID',
|
|
175
|
+
description: 'ID of the product item.',
|
|
176
|
+
type: 'string'
|
|
177
|
+
},
|
|
178
|
+
content_name: {
|
|
179
|
+
label: 'Content Name',
|
|
180
|
+
description: 'Name of the product item.',
|
|
181
|
+
type: 'string'
|
|
182
|
+
},
|
|
183
|
+
brand: {
|
|
184
|
+
label: 'Brand',
|
|
185
|
+
description: 'Brand name of the product item.',
|
|
186
|
+
type: 'string'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
content_type: {
|
|
191
|
+
label: 'Content Type',
|
|
192
|
+
description: 'Type of the product item. When the `content_id` in the `Contents` field is specified as a `sku_id`, set this field to `product`. When the `content_id` in the `Contents` field is specified as an `item_group_id`, set this field to `product_group`.',
|
|
193
|
+
type: 'string',
|
|
194
|
+
choices: ['product', 'product_group'],
|
|
195
|
+
default: 'product'
|
|
196
|
+
},
|
|
197
|
+
currency: {
|
|
198
|
+
label: 'Currency',
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'Currency for the value specified as ISO 4217 code.',
|
|
201
|
+
default: {
|
|
202
|
+
'@path': '$.properties.currency'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
value: {
|
|
206
|
+
label: 'Value',
|
|
207
|
+
type: 'number',
|
|
208
|
+
description: 'Value of the order or items sold.',
|
|
209
|
+
default: {
|
|
210
|
+
'@if': {
|
|
211
|
+
exists: { '@path': '$.properties.value' },
|
|
212
|
+
then: { '@path': '$.properties.value' },
|
|
213
|
+
else: { '@path': '$.properties.revenue' }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
description: {
|
|
218
|
+
label: 'Description',
|
|
219
|
+
type: 'string',
|
|
220
|
+
description: 'A string description of the web event.'
|
|
221
|
+
},
|
|
222
|
+
query: {
|
|
223
|
+
label: 'Query',
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'The text string that was searched for.',
|
|
226
|
+
default: {
|
|
227
|
+
'@path': '$.properties.query'
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
limited_data_use: {
|
|
231
|
+
label: 'Limited Data Use',
|
|
232
|
+
type: 'boolean',
|
|
233
|
+
description: 'Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to [Events API 2.0 - Limited Data Use](https://ads.tiktok.com/marketing_api/docs?id=1771101204435970).',
|
|
234
|
+
default: {
|
|
235
|
+
'@path': '$.properties.limited_data_use'
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
test_event_code: {
|
|
239
|
+
label: 'Test Event Code',
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your TikTok Events Manager under the "Test Event" tab. You\'ll want to remove your Test Event Code when sending real traffic through this integration.'
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=common_fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_fields.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions-sandbox/common_fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,KAAK,EAAE;QACL,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd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0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatUserIds = exports.formatPhones = exports.formatEmails = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const formatEmails = (email_addresses) => {
|
|
6
|
+
const result = [];
|
|
7
|
+
if (email_addresses) {
|
|
8
|
+
email_addresses.forEach((email) => {
|
|
9
|
+
result.push(hashAndEncode(email.toLowerCase()));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
exports.formatEmails = formatEmails;
|
|
15
|
+
const formatPhones = (phone_numbers) => {
|
|
16
|
+
const result = [];
|
|
17
|
+
if (!phone_numbers)
|
|
18
|
+
return result;
|
|
19
|
+
phone_numbers.forEach((phone) => {
|
|
20
|
+
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
21
|
+
if (validatedPhone === null) {
|
|
22
|
+
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
23
|
+
}
|
|
24
|
+
const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
25
|
+
result.push(hashAndEncode(formattedPhone.substring(0, 15)));
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
exports.formatPhones = formatPhones;
|
|
30
|
+
function formatUserIds(userIds) {
|
|
31
|
+
const result = [];
|
|
32
|
+
if (userIds) {
|
|
33
|
+
userIds.forEach((userId) => {
|
|
34
|
+
result.push(hashAndEncode(userId.toLowerCase()));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
exports.formatUserIds = formatUserIds;
|
|
40
|
+
function hashAndEncode(property) {
|
|
41
|
+
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form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,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AARD,sCAQC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions-sandbox/generated-types.ts"],"names":[],"mappings":""}
|