@segment/action-destinations 3.134.1-staging.1 → 3.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/actable-predictive/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +20 -20
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +28 -28
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +25 -25
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.d.ts +18 -12
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js +305 -32
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.d.ts +3 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js +4 -2
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.d.ts +4 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.js +30 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/generated-types.d.ts +53 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/generated-types.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.d.ts +5 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.js +146 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.d.ts +27 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js +60 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.d.ts +63 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js +230 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.d.ts +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.d.ts +3 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js +277 -550
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/index.js +4 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/types/index.d.ts +81 -8
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +10 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js +195 -5
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackEvent/index.js +11 -35
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/index.js +2 -43
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.d.ts +7 -0
- package/dist/destinations/braze/utils.js +103 -0
- package/dist/destinations/braze/utils.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.js +1 -1
- package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/cordial/addContactToList/index.js.map +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/cordial-client.js +2 -2
- package/dist/destinations/cordial/createContactactivity/index.js.map +1 -1
- package/dist/destinations/cordial/identities-fields.d.ts +1 -1
- package/dist/destinations/cordial/identities-fields.js +1 -1
- package/dist/destinations/cordial/identities-fields.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/mergeContacts/index.js.map +1 -1
- package/dist/destinations/cordial/removeContactFromList/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/addUserToAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +11 -2
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.d.ts +1 -0
- package/dist/destinations/criteo-audiences/criteo-audiences.js +11 -2
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +11 -2
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/emarsys/triggerEvent/index.js +1 -0
- package/dist/destinations/emarsys/triggerEvent/index.js.map +1 -1
- package/dist/destinations/emarsys/upsertContact/generated-types.d.ts +1 -0
- package/dist/destinations/emarsys/upsertContact/index.js +1 -0
- package/dist/destinations/emarsys/upsertContact/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +5 -2
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +4 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js +13 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js +3 -3
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +14 -10
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js +11 -7
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +13 -9
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +11 -7
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/customEvent/index.js +10 -6
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +7 -0
- package/dist/destinations/google-analytics-4/ga4-functions.js +44 -7
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +17 -3
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-types.d.ts +14 -0
- package/dist/destinations/google-analytics-4/ga4-types.js +6 -0
- package/dist/destinations/google-analytics-4/ga4-types.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/generateLead/index.js +11 -7
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/generated-types.d.ts +2 -1
- package/dist/destinations/google-analytics-4/index.js +16 -11
- package/dist/destinations/google-analytics-4/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/login/index.js +10 -6
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/pageView/index.js +10 -6
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/purchase/index.js +11 -7
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/refund/index.js +13 -9
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +13 -9
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/search/index.js +10 -6
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js +11 -7
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +11 -7
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/signUp/index.js +10 -6
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewCart/index.js +13 -9
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/index.js +3 -10
- package/dist/destinations/google-sheets-dev/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.d.ts +2 -1
- package/dist/destinations/hubspot/errors.js +2 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/index.js +2 -2
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/intercom/groupIdentifyContact/index.js +1 -0
- package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -1
- package/dist/destinations/ironclad/recordAction.types.d.ts +12 -0
- package/dist/destinations/{braze-cohorts/cohortChanges.js → ironclad/recordAction.types.js} +1 -1
- package/dist/destinations/ironclad/recordAction.types.js.map +1 -0
- package/dist/destinations/linkedin-audiences/index.js +2 -2
- package/dist/destinations/linkedin-audiences/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js +0 -8
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +0 -3
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +0 -3
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.d.ts +14 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.js +83 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.d.ts +13 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js +76 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.d.ts +15 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.js +96 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/generated-types.d.ts +4 -0
- package/dist/destinations/outfunnel/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/index.js +54 -0
- package/dist/destinations/outfunnel/index.js.map +1 -0
- package/dist/destinations/outfunnel/presets.d.ts +2 -0
- package/dist/destinations/outfunnel/presets.js +31 -0
- package/dist/destinations/outfunnel/presets.js.map +1 -0
- package/dist/destinations/outfunnel/utils.d.ts +1 -0
- package/dist/destinations/outfunnel/utils.js +7 -0
- package/dist/destinations/outfunnel/utils.js.map +1 -0
- package/dist/destinations/qualtrics/qualtricsApiClient.js +3 -1
- package/dist/destinations/qualtrics/qualtricsApiClient.js.map +1 -1
- package/dist/destinations/ripe/group/index.js +0 -1
- package/dist/destinations/ripe/group/index.js.map +1 -1
- package/dist/destinations/ripe/identify/index.js +0 -1
- package/dist/destinations/ripe/identify/index.js.map +1 -1
- package/dist/destinations/ripe/page/index.js +0 -1
- package/dist/destinations/ripe/page/index.js.map +1 -1
- package/dist/destinations/ripe/track/index.js +0 -1
- package/dist/destinations/ripe/track/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/segment/errors.d.ts +3 -3
- package/dist/destinations/segment/errors.js +2 -2
- package/dist/destinations/segment/errors.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +2 -1
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +1 -1
- package/dist/destinations/segment-profiles/errors.d.ts +3 -3
- package/dist/destinations/segment-profiles/errors.js +2 -2
- package/dist/destinations/segment-profiles/errors.js.map +1 -1
- package/dist/destinations/segment-profiles/segment-properties.js +1 -1
- package/dist/destinations/toplyne/constants.d.ts +1 -0
- package/dist/destinations/toplyne/constants.js +5 -0
- package/dist/destinations/toplyne/constants.js.map +1 -0
- package/dist/destinations/{google-sheets-partner → toplyne}/generated-types.d.ts +1 -0
- package/dist/destinations/toplyne/generated-types.js.map +1 -0
- package/dist/destinations/{tiktok-audiences → toplyne}/index.d.ts +1 -1
- package/dist/destinations/toplyne/index.js +69 -0
- package/dist/destinations/toplyne/index.js.map +1 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.d.ts +7 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendAccountProfiles/index.js +49 -0
- package/dist/destinations/toplyne/sendAccountProfiles/index.js.map +1 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.d.ts +10 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendEvents/index.js +70 -0
- package/dist/destinations/toplyne/sendEvents/index.js.map +1 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.d.ts +8 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendUserProfiles/index.js +56 -0
- package/dist/destinations/toplyne/sendUserProfiles/index.js.map +1 -0
- package/dist/destinations/twilio/sendSMS.types.d.ts +1 -0
- package/dist/destinations/voucherify/index.js +1 -1
- package/dist/destinations/voucherify/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +0 -2
- package/dist/destinations/actions-bingads/functions.js.map +0 -1
- package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
- package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/index.js +0 -77
- package/dist/destinations/actions-bingads/index.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
- package/dist/destinations/braze-cohorts/cohortChanges.d.ts +0 -10
- package/dist/destinations/braze-cohorts/cohortChanges.js.map +0 -1
- package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
- package/dist/destinations/google-sheets-partner/constants.js +0 -7
- package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
- package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
- package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/index.d.ts +0 -4
- package/dist/destinations/google-sheets-partner/index.js +0 -43
- package/dist/destinations/google-sheets-partner/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.d.ts +0 -11
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
- package/dist/destinations/tiktok-audiences/addUser/generated-types.d.ts +0 -12
- package/dist/destinations/tiktok-audiences/addUser/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/addUser/index.js +0 -47
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/api/api.test.d.ts +0 -1
- package/dist/destinations/tiktok-audiences/api/api.test.js +0 -118
- package/dist/destinations/tiktok-audiences/api/api.test.js.map +0 -1
- package/dist/destinations/tiktok-audiences/api/index.d.ts +0 -13
- package/dist/destinations/tiktok-audiences/api/index.js +0 -93
- package/dist/destinations/tiktok-audiences/api/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/constants.d.ts +0 -2
- package/dist/destinations/tiktok-audiences/constants.js +0 -6
- package/dist/destinations/tiktok-audiences/constants.js.map +0 -1
- package/dist/destinations/tiktok-audiences/functions.d.ts +0 -14
- package/dist/destinations/tiktok-audiences/functions.js +0 -116
- package/dist/destinations/tiktok-audiences/functions.js.map +0 -1
- package/dist/destinations/tiktok-audiences/generated-types.d.ts +0 -3
- package/dist/destinations/tiktok-audiences/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/index.js +0 -38
- package/dist/destinations/tiktok-audiences/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/properties.d.ts +0 -11
- package/dist/destinations/tiktok-audiences/properties.js +0 -80
- package/dist/destinations/tiktok-audiences/properties.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeUser/generated-types.d.ts +0 -12
- package/dist/destinations/tiktok-audiences/removeUser/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeUser/index.js +0 -47
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/types.d.ts +0 -33
- package/dist/destinations/tiktok-audiences/types.js +0 -3
- package/dist/destinations/tiktok-audiences/types.js.map +0 -1
- /package/dist/destinations/{actions-bingads → blackbaud-raisers-edge-nxt/createConstituentAction}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads/offlineConversions → blackbaud-raisers-edge-nxt/createGift}/generated-types.js +0 -0
- /package/dist/destinations/{google-sheets-partner/postSheet → blackbaud-raisers-edge-nxt/createGift}/index.d.ts +0 -0
- /package/dist/destinations/{google-sheets-partner → outfunnel/forwardGroupEvent}/generated-types.js +0 -0
- /package/dist/destinations/{google-sheets-partner/postSheet → outfunnel/forwardIdentifyEvent}/generated-types.js +0 -0
- /package/dist/destinations/{tiktok-audiences/addUser → outfunnel/forwardTrackEvent}/generated-types.js +0 -0
- /package/dist/destinations/{tiktok-audiences → outfunnel}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads → outfunnel}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/removeUser → toplyne}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads/offlineConversions → toplyne/sendAccountProfiles}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/addUser → toplyne/sendEvents}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/removeUser → toplyne/sendUserProfiles}/index.d.ts +0 -0
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ga4_functions_1 = require("../ga4-functions");
|
|
4
4
|
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
+
const ga4_types_1 = require("../ga4-types");
|
|
5
6
|
const action = {
|
|
6
7
|
title: 'Login',
|
|
7
8
|
description: 'Send event when a user logs in',
|
|
8
9
|
defaultSubscription: 'type = "track" and event = "Signed In"',
|
|
9
10
|
fields: {
|
|
11
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
12
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
10
13
|
client_id: { ...ga4_properties_1.client_id },
|
|
11
14
|
user_id: { ...ga4_properties_1.user_id },
|
|
12
15
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -19,13 +22,17 @@ const action = {
|
|
|
19
22
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
20
23
|
params: ga4_properties_1.params
|
|
21
24
|
},
|
|
22
|
-
perform: (request, { payload, features }) => {
|
|
25
|
+
perform: (request, { payload, features, settings }) => {
|
|
26
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
27
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
28
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
29
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
23
30
|
if (features && features['actions-google-analytics-4-verify-params-feature']) {
|
|
24
31
|
ga4_functions_1.verifyParams(payload.params);
|
|
25
32
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
26
33
|
}
|
|
27
34
|
const request_object = {
|
|
28
|
-
|
|
35
|
+
...stream_params.identifier,
|
|
29
36
|
user_id: payload.user_id,
|
|
30
37
|
events: [
|
|
31
38
|
{
|
|
@@ -42,10 +49,7 @@ const action = {
|
|
|
42
49
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
43
50
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
44
51
|
}
|
|
45
|
-
return request
|
|
46
|
-
method: 'POST',
|
|
47
|
-
json: request_object
|
|
48
|
-
});
|
|
52
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
55
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/login/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/login/index.ts"],"names":[],"mappings":";;AAGA,oDAOyB;AACzB,sDAU0B;AAC1B,4CAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,wCAAwC;IAC7D,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAA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O,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ga4_functions_1 = require("../ga4-functions");
|
|
4
4
|
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
+
const ga4_types_1 = require("../ga4-types");
|
|
5
6
|
const action = {
|
|
6
7
|
title: 'Page View',
|
|
7
8
|
description: 'Send page view when a user views a page',
|
|
8
9
|
defaultSubscription: 'type = "page"',
|
|
9
10
|
fields: {
|
|
11
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
12
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
10
13
|
clientId: { ...ga4_properties_1.client_id },
|
|
11
14
|
user_id: { ...ga4_properties_1.user_id },
|
|
12
15
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -38,13 +41,17 @@ const action = {
|
|
|
38
41
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
39
42
|
params: ga4_properties_1.params
|
|
40
43
|
},
|
|
41
|
-
perform: (request, { payload, features }) => {
|
|
44
|
+
perform: (request, { payload, features, settings }) => {
|
|
45
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
46
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
47
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
48
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.clientId);
|
|
42
49
|
if (features && features['actions-google-analytics-4-verify-params-feature']) {
|
|
43
50
|
ga4_functions_1.verifyParams(payload.params);
|
|
44
51
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
45
52
|
}
|
|
46
53
|
const request_object = {
|
|
47
|
-
|
|
54
|
+
...stream_params.identifier,
|
|
48
55
|
user_id: payload.user_id,
|
|
49
56
|
events: [
|
|
50
57
|
{
|
|
@@ -63,10 +70,7 @@ const action = {
|
|
|
63
70
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
64
71
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
65
72
|
}
|
|
66
|
-
return request
|
|
67
|
-
method: 'POST',
|
|
68
|
-
json: request_object
|
|
69
|
-
});
|
|
73
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
70
74
|
}
|
|
71
75
|
};
|
|
72
76
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/pageView/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/pageView/index.ts"],"names":[],"mappings":";;AAGA,oDAOyB;AACzB,sDAU0B;AAC1B,4CAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,QAAQ,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC1B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,aAAa,EAAE;YACb,K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;oBACE,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE;wBACN,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,aAAa,EAAE,OAAO,CAAC,aAAa;wBACpC,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QACD,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
|
+
const ga4_types_1 = require("../ga4-types");
|
|
5
6
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
7
|
const action = {
|
|
7
8
|
title: 'Purchase',
|
|
8
9
|
description: 'Send event when a user completes a purchase',
|
|
9
10
|
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
10
11
|
fields: {
|
|
12
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
11
14
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
15
|
user_id: { ...ga4_properties_1.user_id },
|
|
13
16
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -26,13 +29,17 @@ const action = {
|
|
|
26
29
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
27
30
|
params: ga4_properties_1.params
|
|
28
31
|
},
|
|
29
|
-
perform: (request, { payload, features }) => {
|
|
32
|
+
perform: (request, { payload, features, settings }) => {
|
|
33
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
34
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
35
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
36
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
30
37
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
31
38
|
let googleItems = [];
|
|
32
39
|
if (payload.items) {
|
|
33
40
|
googleItems = payload.items.map((product) => {
|
|
34
41
|
if (product.item_name === undefined && product.item_id === undefined) {
|
|
35
|
-
throw new actions_core_1.
|
|
42
|
+
throw new actions_core_1.PayloadValidationError('One of product name or product id is required for product or impression data.');
|
|
36
43
|
}
|
|
37
44
|
if (product.currency) {
|
|
38
45
|
ga4_functions_1.verifyCurrency(product.currency);
|
|
@@ -45,7 +52,7 @@ const action = {
|
|
|
45
52
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
46
53
|
}
|
|
47
54
|
const request_object = {
|
|
48
|
-
|
|
55
|
+
...stream_params.identifier,
|
|
49
56
|
user_id: payload.user_id,
|
|
50
57
|
events: [
|
|
51
58
|
{
|
|
@@ -69,10 +76,7 @@ const action = {
|
|
|
69
76
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
70
77
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
71
78
|
}
|
|
72
|
-
return request
|
|
73
|
-
method: 'POST',
|
|
74
|
-
json: request_object
|
|
75
|
-
});
|
|
79
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
76
80
|
}
|
|
77
81
|
};
|
|
78
82
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/purchase/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/purchase/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAGhF,oDAQyB;AACzB,4CAA4E;AAC5E,sDAkB0B;AAI1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,WAAW,EAAE,EAAE,GAAG,4BAAW,EAAE;QAC/B,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QAClE,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAGzC,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,cAAc,EAAE,EAAE,GAAG,+BAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;QACrD,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,GAAG,EAAE,EAAE,GAAG,oBAAG,EAAE;QACf,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE;QAC/D,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OA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U;oBAChB,MAAM,EAAE;wBACN,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,KAAK,EAAE,WAAW;wBAClB,cAAc,EAAE,OAAO,CAAC,cAAc;wBACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,GAAG,EAAE,OAAO,CAAC,GAAG;wBAChB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
|
+
const ga4_types_1 = require("../ga4-types");
|
|
6
7
|
const action = {
|
|
7
8
|
title: 'Refund',
|
|
8
9
|
description: 'Send event when a refund is issued',
|
|
9
10
|
defaultSubscription: 'type = "track" and event = "Order Refunded"',
|
|
10
11
|
fields: {
|
|
12
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
11
14
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
15
|
user_id: { ...ga4_properties_1.user_id },
|
|
13
16
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -29,21 +32,25 @@ const action = {
|
|
|
29
32
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
30
33
|
params: ga4_properties_1.params
|
|
31
34
|
},
|
|
32
|
-
perform: (request, { payload, features }) => {
|
|
35
|
+
perform: (request, { payload, features, settings }) => {
|
|
36
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
37
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
38
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
39
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
33
40
|
if (payload.currency) {
|
|
34
41
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
35
42
|
}
|
|
36
43
|
if (payload.value && payload.currency === undefined) {
|
|
37
|
-
throw new actions_core_1.IntegrationError('Currency is required if value is set.',
|
|
44
|
+
throw new actions_core_1.IntegrationError('Currency is required if value is set.', actions_core_1.ErrorCodes.INVALID_CURRENCY_CODE, 400);
|
|
38
45
|
}
|
|
39
46
|
if (payload.currency === undefined && (!payload.items || !payload.items[0] || !payload.items[0].currency)) {
|
|
40
|
-
throw new actions_core_1.
|
|
47
|
+
throw new actions_core_1.PayloadValidationError('One of item-level currency or top-level currency is required.');
|
|
41
48
|
}
|
|
42
49
|
let googleItems = [];
|
|
43
50
|
if (payload.items) {
|
|
44
51
|
googleItems = payload.items.map((product) => {
|
|
45
52
|
if (product.item_name === undefined && product.item_id === undefined) {
|
|
46
|
-
throw new actions_core_1.
|
|
53
|
+
throw new actions_core_1.PayloadValidationError('One of product name or product id is required for product or impression data.');
|
|
47
54
|
}
|
|
48
55
|
if (product.currency) {
|
|
49
56
|
ga4_functions_1.verifyCurrency(product.currency);
|
|
@@ -56,7 +63,7 @@ const action = {
|
|
|
56
63
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
57
64
|
}
|
|
58
65
|
const request_object = {
|
|
59
|
-
|
|
66
|
+
...stream_params.identifier,
|
|
60
67
|
user_id: payload.user_id,
|
|
61
68
|
events: [
|
|
62
69
|
{
|
|
@@ -80,10 +87,7 @@ const action = {
|
|
|
80
87
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
81
88
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
82
89
|
}
|
|
83
|
-
return request
|
|
84
|
-
method: 'POST',
|
|
85
|
-
json: request_object
|
|
86
|
-
});
|
|
90
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
87
91
|
}
|
|
88
92
|
};
|
|
89
93
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/refund/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/refund/index.ts"],"names":[],"mappings":";;AAAA,wDAA8G;AAC9G,oDAQyB;AACzB,sDAiB0B;AAC1B,4CAA4E;AAI5E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,oCAAoC;IACjD,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,cAAc,EAAE,EAAE,GAAG,+BAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;QACr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AAG;wBAChB,KAAK,EAAE,WAAW;wBAClB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
|
+
const ga4_types_1 = require("../ga4-types");
|
|
6
7
|
const action = {
|
|
7
8
|
title: 'Remove from Cart',
|
|
8
9
|
description: 'Send event when a user removes items from a cart',
|
|
9
10
|
defaultSubscription: 'type = "track" and event = "Product Removed"',
|
|
10
11
|
fields: {
|
|
12
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
11
14
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
15
|
user_id: { ...ga4_properties_1.user_id },
|
|
13
16
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -21,21 +24,25 @@ const action = {
|
|
|
21
24
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
22
25
|
params: ga4_properties_1.params
|
|
23
26
|
},
|
|
24
|
-
perform: (request, { payload, features }) => {
|
|
27
|
+
perform: (request, { payload, features, settings }) => {
|
|
28
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
29
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
30
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
31
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
25
32
|
if (payload.currency) {
|
|
26
33
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
27
34
|
}
|
|
28
35
|
if (payload.value && payload.currency === undefined) {
|
|
29
|
-
throw new actions_core_1.IntegrationError('Currency is required if value is set.',
|
|
36
|
+
throw new actions_core_1.IntegrationError('Currency is required if value is set.', actions_core_1.ErrorCodes.INVALID_CURRENCY_CODE, 400);
|
|
30
37
|
}
|
|
31
38
|
if (payload.currency === undefined && (!payload.items || !payload.items[0] || !payload.items[0].currency)) {
|
|
32
|
-
throw new actions_core_1.
|
|
39
|
+
throw new actions_core_1.PayloadValidationError('One of item-level currency or top-level currency is required.');
|
|
33
40
|
}
|
|
34
41
|
let googleItems = [];
|
|
35
42
|
if (payload.items) {
|
|
36
43
|
googleItems = payload.items.map((product) => {
|
|
37
44
|
if (product.item_name === undefined && product.item_id === undefined) {
|
|
38
|
-
throw new actions_core_1.
|
|
45
|
+
throw new actions_core_1.PayloadValidationError('One of product name or product id is required for product or impression data.');
|
|
39
46
|
}
|
|
40
47
|
if (product.currency) {
|
|
41
48
|
ga4_functions_1.verifyCurrency(product.currency);
|
|
@@ -48,7 +55,7 @@ const action = {
|
|
|
48
55
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
49
56
|
}
|
|
50
57
|
const request_object = {
|
|
51
|
-
|
|
58
|
+
...stream_params.identifier,
|
|
52
59
|
user_id: payload.user_id,
|
|
53
60
|
events: [
|
|
54
61
|
{
|
|
@@ -67,10 +74,7 @@ const action = {
|
|
|
67
74
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
68
75
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
69
76
|
}
|
|
70
|
-
return request
|
|
71
|
-
method: 'POST',
|
|
72
|
-
json: request_object
|
|
73
|
-
});
|
|
77
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
74
78
|
}
|
|
75
79
|
};
|
|
76
80
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/removeFromCart/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/removeFromCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA8G;AAC9G,oDAQyB;AACzB,sDAa0B;AAC1B,4CAA4E;AAI5E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,kDAAkD;IAC/D,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpD,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAA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gBAED,OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,kDAAkD,CAAC,EAAE;YAC5E,4BAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAC5B,+BAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;SACzC;QACD,MAAM,cAAc,GAA+B;YACjD,GAAG,aAAa,CAAC,UAAU;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,kBAAkB;oBACxB,MAAM,EAAE;wBACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,KAAK,EAAE,WAAW;wBAClB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ga4_functions_1 = require("../ga4-functions");
|
|
4
4
|
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
+
const ga4_types_1 = require("../ga4-types");
|
|
5
6
|
const action = {
|
|
6
7
|
title: 'Search',
|
|
7
8
|
description: 'Send event when a user searches your content',
|
|
8
9
|
defaultSubscription: 'type = "track" and event = "Products Searched"',
|
|
9
10
|
fields: {
|
|
11
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
12
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
10
13
|
client_id: { ...ga4_properties_1.client_id },
|
|
11
14
|
user_id: { ...ga4_properties_1.user_id },
|
|
12
15
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -23,13 +26,17 @@ const action = {
|
|
|
23
26
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
24
27
|
params: ga4_properties_1.params
|
|
25
28
|
},
|
|
26
|
-
perform: (request, { payload, features }) => {
|
|
29
|
+
perform: (request, { payload, features, settings }) => {
|
|
30
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
31
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
32
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
33
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
27
34
|
if (features && features['actions-google-analytics-4-verify-params-feature']) {
|
|
28
35
|
ga4_functions_1.verifyParams(payload.params);
|
|
29
36
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
30
37
|
}
|
|
31
38
|
const request_object = {
|
|
32
|
-
|
|
39
|
+
...stream_params.identifier,
|
|
33
40
|
user_id: payload.user_id,
|
|
34
41
|
events: [
|
|
35
42
|
{
|
|
@@ -46,10 +53,7 @@ const action = {
|
|
|
46
53
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
47
54
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
48
55
|
}
|
|
49
|
-
return request
|
|
50
|
-
method: 'POST',
|
|
51
|
-
json: request_object
|
|
52
|
-
});
|
|
56
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/search/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/search/index.ts"],"names":[],"mappings":";;AAGA,oDAOyB;AACzB,sDAU0B;AAC1B,4CAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,8CAA8C;IAC3D,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,oBAAoB;aAC9B;SACF;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpD,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,0BAAc,CAAC,GAAG,CAAA;QACvE,MAAM,aAAa,GACjB,gBAAgB,KAAK,0BAAc,CAAC,SAAS;YAC3C,CAAC,CAAC,qCAAqB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC;YAC5F,CAAC,CAAC,kCAAkB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;QAEvF,IAAI,QAAQ,IAAI,QAAQ,CAAC,kDAAkD,CAAC,EAAE;YAC5E,4BAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAC5B,+BAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;SACzC;QACD,MAAM,cAAc,GAA+B;YACjD,GAAG,aAAa,CAAC,UAAU;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE;wBACN,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
|
+
const ga4_types_1 = require("../ga4-types");
|
|
5
6
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
7
|
const action = {
|
|
7
8
|
title: 'Select Item',
|
|
8
9
|
description: 'Send event when a user selects an item from a list',
|
|
9
10
|
defaultSubscription: 'type = "track" and event = "Product Clicked"',
|
|
10
11
|
fields: {
|
|
12
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
11
14
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
15
|
user_id: { ...ga4_properties_1.user_id },
|
|
13
16
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -29,12 +32,16 @@ const action = {
|
|
|
29
32
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
30
33
|
params: ga4_properties_1.params
|
|
31
34
|
},
|
|
32
|
-
perform: (request, { payload, features }) => {
|
|
35
|
+
perform: (request, { payload, features, settings }) => {
|
|
36
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
37
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
38
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
39
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
33
40
|
let googleItems = [];
|
|
34
41
|
if (payload.items) {
|
|
35
42
|
googleItems = payload.items.map((product) => {
|
|
36
43
|
if (product.item_name === undefined && product.item_id === undefined) {
|
|
37
|
-
throw new actions_core_1.
|
|
44
|
+
throw new actions_core_1.PayloadValidationError('One of product name or product id is required for product or impression data.');
|
|
38
45
|
}
|
|
39
46
|
if (product.currency) {
|
|
40
47
|
ga4_functions_1.verifyCurrency(product.currency);
|
|
@@ -47,7 +54,7 @@ const action = {
|
|
|
47
54
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
48
55
|
}
|
|
49
56
|
const request_object = {
|
|
50
|
-
|
|
57
|
+
...stream_params.identifier,
|
|
51
58
|
user_id: payload.user_id,
|
|
52
59
|
events: [
|
|
53
60
|
{
|
|
@@ -66,10 +73,7 @@ const action = {
|
|
|
66
73
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
67
74
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
68
75
|
}
|
|
69
|
-
return request
|
|
70
|
-
method: 'POST',
|
|
71
|
-
json: request_object
|
|
72
|
-
});
|
|
76
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
73
77
|
}
|
|
74
78
|
};
|
|
75
79
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/selectItem/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/selectItem/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAChF,oDAQyB;AACzB,4CAA4E;AAG5E,sDAW0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,eAAe,EAAE,EAAE,GAAG,gCAAe,EAAE;QACvC,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,cAAc,EAAE;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,mEAAmE;YAChF,IAAI,EAAE,QAAQ;SACf;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,iEAAiE;YAC9E,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,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tC,YAAY,EAAE,OAAO,CAAC,YAAY;wBAClC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,wBAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
|
+
const ga4_types_1 = require("../ga4-types");
|
|
6
7
|
const action = {
|
|
7
8
|
title: 'Select Promotion',
|
|
8
9
|
description: 'Send event when a user selects a promotion',
|
|
9
10
|
defaultSubscription: 'type = "track" and event = "Promotion Clicked"',
|
|
10
11
|
fields: {
|
|
12
|
+
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
+
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
11
14
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
15
|
user_id: { ...ga4_properties_1.user_id },
|
|
13
16
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -42,12 +45,16 @@ const action = {
|
|
|
42
45
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
43
46
|
params: ga4_properties_1.params
|
|
44
47
|
},
|
|
45
|
-
perform: (request, { payload, features }) => {
|
|
48
|
+
perform: (request, { payload, features, settings }) => {
|
|
49
|
+
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
50
|
+
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
51
|
+
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
52
|
+
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
46
53
|
let googleItems = [];
|
|
47
54
|
if (payload.items) {
|
|
48
55
|
googleItems = payload.items.map((product) => {
|
|
49
56
|
if (product.item_name === undefined && product.item_id === undefined) {
|
|
50
|
-
throw new actions_core_1.
|
|
57
|
+
throw new actions_core_1.PayloadValidationError('One of product name or product id is required for product or impression data.');
|
|
51
58
|
}
|
|
52
59
|
if (product.currency) {
|
|
53
60
|
ga4_functions_1.verifyCurrency(product.currency);
|
|
@@ -60,7 +67,7 @@ const action = {
|
|
|
60
67
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
61
68
|
}
|
|
62
69
|
const request_object = {
|
|
63
|
-
|
|
70
|
+
...stream_params.identifier,
|
|
64
71
|
user_id: payload.user_id,
|
|
65
72
|
events: [
|
|
66
73
|
{
|
|
@@ -82,10 +89,7 @@ const action = {
|
|
|
82
89
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
83
90
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
84
91
|
}
|
|
85
|
-
return request
|
|
86
|
-
method: 'POST',
|
|
87
|
-
json: request_object
|
|
88
|
-
});
|
|
92
|
+
return ga4_functions_1.sendData(request, stream_params.search_params, request_object);
|
|
89
93
|
}
|
|
90
94
|
};
|
|
91
95
|
exports.default = action;
|