Skip to content

Commit

Permalink
Introduces shared adAccountId top-level setting and audienceSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-Ag committed Jul 16, 2024
1 parent 0a20b76 commit 5ba6c09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { GlobalSetting } from '@segment/actions-core'

export const adAccountId: GlobalSetting = {
type: 'string',
label: 'Advertiser Account ID',
description: 'Your advertiser account id. Read [more](https://www.facebook.com/business/help/1492627900875762).',
required: true
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AudienceDestinationDefinition } from '@segment/actions-core'
import { IntegrationError } from '@segment/actions-core'
import type { Settings, AudienceSettings } from './generated-types'

import { adAccountId } from './fbca-properties'
import sync from './sync'

export const FACEBOOK_API_VERSION = 'v17.0'
Expand All @@ -16,11 +16,7 @@ const destination: AudienceDestinationDefinition<Settings, AudienceSettings> = {
authentication: {
scheme: 'oauth2',
fields: {
placeholder: {
label: 'Placeholder',
description: 'Placeholder',
type: 'string'
}
adAccountId
},
refreshAccessToken: async () => {
return { accessToken: 'TODO: Implement this' }
Expand All @@ -34,12 +30,7 @@ const destination: AudienceDestinationDefinition<Settings, AudienceSettings> = {
}
},
audienceFields: {
adAccountId: {
type: 'string',
label: 'Advertiser Account ID',
description: 'Your advertiser account id. Read [more](https://www.facebook.com/business/help/1492627900875762).',
required: true
},
adAccountId,
audienceDescription: {
type: 'string',
label: 'Description',
Expand Down

0 comments on commit 5ba6c09

Please sign in to comment.