-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
3,154 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
# Only allow these users to create new hotfix branch from 'main' | ||
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823') | ||
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116') | ||
steps: | ||
- name: Create Branch | ||
uses: peterjgrainger/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
# Only allow release stakeholders to initiate releases | ||
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823') | ||
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116') | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
const { getMappingConfig } = require('../../util'); | ||
|
||
const ENDPOINT = (datasetId, accessToken) => | ||
`https://graph.facebook.com/v17.0/${datasetId}/events?access_token=${accessToken}`; | ||
|
||
const CONFIG_CATEGORIES = { | ||
USERDATA: { | ||
standard: false, | ||
type: 'identify', | ||
name: 'FBCUserDataConfig', | ||
}, | ||
COMMON: { name: 'FBCCommonConfig' }, | ||
APPDATA: { name: 'FBCAppEventsConfig' }, | ||
SIMPLE_TRACK: { | ||
standard: false, | ||
type: 'simple track', | ||
name: 'FBCSimpleCustomConfig', | ||
}, | ||
PRODUCT_LIST_VIEWED: { | ||
standard: true, | ||
type: 'product list viewed', | ||
eventName: 'ViewContent', | ||
name: 'FBCProductListViewedCustomData', | ||
}, | ||
PRODUCT_VIEWED: { | ||
standard: true, | ||
type: 'product viewed', | ||
eventName: 'ViewContent', | ||
name: 'FBCProductViewedCustomData', | ||
}, | ||
PRODUCT_ADDED: { | ||
standard: true, | ||
type: 'product added', | ||
eventName: 'AddToCart', | ||
name: 'FBCProductAddedCustomData', | ||
}, | ||
ORDER_COMPLETED: { | ||
standard: true, | ||
type: 'order completed', | ||
eventName: 'Purchase', | ||
name: 'FBCOrderCompletedCustomData', | ||
}, | ||
PRODUCTS_SEARCHED: { | ||
standard: true, | ||
type: 'products searched', | ||
eventName: 'Search', | ||
name: 'FBCProductSearchedCustomData', | ||
}, | ||
CHECKOUT_STARTED: { | ||
standard: true, | ||
type: 'checkout started', | ||
eventName: 'InitiateCheckout', | ||
name: 'FBCCheckoutStartedCustomData', | ||
}, | ||
PAYMENT_INFO_ENTERED: { | ||
standard: true, | ||
type: 'payment info entered', | ||
eventName: 'AddPaymentInfo', | ||
name: 'FBCPaymentInfoEnteredCustomData', | ||
}, | ||
PRODUCT_ADDED_TO_WISHLIST: { | ||
standard: true, | ||
type: 'product added to wishlist', | ||
eventName: 'AddToWishlist', | ||
name: 'FBCProductAddedToWishlistCustomData', | ||
}, | ||
OTHER_STANDARD: { | ||
standard: true, | ||
type: 'otherStandard', | ||
name: 'FBCSimpleCustomConfig', | ||
}, | ||
PAGE_VIEW: { | ||
standard: true, | ||
type: 'page_view', | ||
eventName: 'PageView', | ||
name: 'FBCSimpleCustomConfig', | ||
}, | ||
}; | ||
|
||
const MAPPING_CONFIG = getMappingConfig(CONFIG_CATEGORIES, __dirname); | ||
const ACTION_SOURCES_VALUES = [ | ||
'email', | ||
'website', | ||
'app', | ||
'phone_call', | ||
'chat', | ||
'physical_store', | ||
'system_generated', | ||
'other', | ||
]; | ||
|
||
const OTHER_STANDARD_EVENTS = [ | ||
'Lead', | ||
'CompleteRegistration', | ||
'Contact', | ||
'CustomizeProduct', | ||
'Donate', | ||
'FindLocation', | ||
'Schedule', | ||
'StartTrial', | ||
'SubmitApplication', | ||
'Subscribe', | ||
]; | ||
|
||
const FB_CONVERSIONS_DEFAULT_EXCLUSION = ['opt_out', 'event_id', 'action_source']; | ||
const STANDARD_ECOMM_EVENTS_CATEGORIES = [ | ||
CONFIG_CATEGORIES.PRODUCT_LIST_VIEWED, | ||
CONFIG_CATEGORIES.PRODUCT_VIEWED, | ||
CONFIG_CATEGORIES.PRODUCT_ADDED, | ||
CONFIG_CATEGORIES.ORDER_COMPLETED, | ||
CONFIG_CATEGORIES.PRODUCTS_SEARCHED, | ||
CONFIG_CATEGORIES.CHECKOUT_STARTED, | ||
CONFIG_CATEGORIES.PAYMENT_INFO_ENTERED, | ||
CONFIG_CATEGORIES.PRODUCT_ADDED_TO_WISHLIST, | ||
]; | ||
|
||
module.exports = { | ||
ENDPOINT, | ||
MAPPING_CONFIG, | ||
CONFIG_CATEGORIES, | ||
ACTION_SOURCES_VALUES, | ||
FB_CONVERSIONS_DEFAULT_EXCLUSION, | ||
STANDARD_ECOMM_EVENTS_CATEGORIES, | ||
OTHER_STANDARD_EVENTS, | ||
DESTINATION: 'FACEBOOK_CONVERSIONS', | ||
}; |
101 changes: 101 additions & 0 deletions
101
src/v0/destinations/facebook_conversions/data/FBCAppEventsConfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[ | ||
{ | ||
"destKey": "advertiser_tracking_enabled", | ||
"sourceKeys": "context.device.adTrackingEnabled", | ||
"required": true | ||
}, | ||
{ | ||
"destKey": "application_tracking_enabled", | ||
"sourceKeys": "properties.application_tracking_enabled", | ||
"required": true | ||
}, | ||
{ | ||
"destKey": "extinfo.0", | ||
"sourceKeys": "context.device.type", | ||
"required": true, | ||
"metadata": { | ||
"type": "toLower" | ||
} | ||
}, | ||
{ | ||
"destKey": "extinfo.1", | ||
"sourceKeys": "context.app.namespace" | ||
}, | ||
{ | ||
"destKey": "extinfo.2", | ||
"sourceKeys": "context.app.build" | ||
}, | ||
{ | ||
"destKey": "extinfo.3", | ||
"sourceKeys": "context.app.version" | ||
}, | ||
{ | ||
"destKey": "extinfo.4", | ||
"sourceKeys": "context.os.version", | ||
"required": true | ||
}, | ||
{ | ||
"destKey": "extinfo.5", | ||
"sourceKeys": "context.device.model" | ||
}, | ||
{ | ||
"destKey": "extinfo.6", | ||
"sourceKeys": "context.locale" | ||
}, | ||
{ | ||
"destKey": "extinfo.7", | ||
"sourceKeys": "context.abv_timezone" | ||
}, | ||
{ | ||
"destKey": "extinfo.8", | ||
"sourceKeys": "context.network.carrier" | ||
}, | ||
{ | ||
"destKey": "extinfo.9", | ||
"sourceKeys": "context.screen.width" | ||
}, | ||
{ | ||
"destKey": "extinfo.10", | ||
"sourceKeys": "context.screen.height" | ||
}, | ||
{ | ||
"destKey": "extinfo.11", | ||
"sourceKeys": "context.screen.density" | ||
}, | ||
{ | ||
"destKey": "extinfo.12", | ||
"sourceKeys": "context.cpu_cores" | ||
}, | ||
{ | ||
"destKey": "extinfo.13", | ||
"sourceKeys": "context.ext_storage_size" | ||
}, | ||
{ | ||
"destKey": "extinfo.14", | ||
"sourceKeys": "context.avl_storage_size" | ||
}, | ||
{ | ||
"destKey": "extinfo.15", | ||
"sourceKeys": "context.timezone" | ||
}, | ||
{ | ||
"destKey": "campaign_ids", | ||
"sourceKeys": ["properties.campaignId", "context.traits.campaignId", "context.campaign.name"] | ||
}, | ||
{ | ||
"destKey": "install_referrer", | ||
"sourceKeys": "properties.install_referrer" | ||
}, | ||
{ | ||
"destKey": "installer_package", | ||
"sourceKeys": "properties.installer_package" | ||
}, | ||
{ | ||
"destKey": "url_schemes", | ||
"sourceKeys": "properties.url_schemes" | ||
}, | ||
{ | ||
"destKey": "windows_attribution_id", | ||
"sourceKeys": "properties.windows_attribution_id" | ||
} | ||
] |
Oops, something went wrong.