LinkedIn Ads
This connector captures data from LinkedIn Ads into Flow collections through the LinkedIn Marketing API.
ghcr.io/estuary/source-linkedin-ads:dev
provides the latest connector image. You can also follow the link in your browser to see past image versions.
This connector is based on an open-source connector from a third party, with modifications for performance in the Flow system. You can find their documentation here, but keep in mind that the two versions may be significantly different.
Supported data resources
The following data resources are supported:
- Accounts
- Account users
- Campaign groups
- Campaigns
- Creatives
- AdDirectSponsoredContents (Video ads)
- Ad analytics by campaign
- Ad analytics by creative
By default, each resource is mapped to a Flow collection through a separate binding.
Prerequisites
There are two ways to authenticate with LinkedIn when capturing data into Flow: using OAuth2, and manually, by creating a developer application. Their prerequisites differ.
OAuth is recommended for simplicity in the Flow web app; the developer application method is the only supported method using the command line.
Using OAuth2 to authenticate with LinkedIn in the Flow web app
-
One or more LinkedIn Ad Accounts with active campaigns.
-
A LinkedIn user with access to the Ad Accounts from which you want to capture data.
Configuring the connector specification manually
To configure without using OAuth, you'll need to create an application using the LinkedIn Marketing API, and generate its access token.
Setup
- Create a marketing application on LinkedIn Developers.
- Apply to the LinkedIn Developer Program.
- Generate your access token.
LinkedIn access tokens expire in 60 days. You must manually update your capture configuration to continue to capture data from LinkedIn.
Configuration
You configure connectors either in the Flow web app, or by directly editing the capture specification. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the LinkedIn Ads source connector.
Properties
Endpoint
The properties in the table below reflect the manual authentication method. If you're working in the Flow web app, you'll use OAuth2, so some of these properties aren't required.
Property | Title | Description | Type | Required/Default |
---|---|---|---|---|
/account_ids | Account IDs (Optional) | A space-separated list of the account IDs from which to capture data. Leave empty if you want to capture data from all linked accounts. | array | [] |
/credentials | Authentication | object | ||
/credentials/auth_method | Authentication method | Set to access_token to authenticate manually. | string | |
/credentials/access_token | Access token | Access token generated from your LinkedIn Developers app. | string | |
/start_date | Start date | UTC date in the format 2020-09-17. Any data before this date will not be replicated. | string | Required |
Bindings
Property | Title | Description | Type | Required/Default |
---|---|---|---|---|
/stream | Stream | LinkedIn Ads stream from which a collection is captured. | string | Required |
/syncMode | Sync Mode | Connection method. | string | Required |
Sample
This sample specification reflects the manual authentication method.
captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-linkedin-ads:dev
config:
account_ids:
- 000000000
- 111111111
credentials:
auth_method: access_token
access_token: {secret}
start_date: 2022-01-01
bindings:
- resource:
stream: campaigns
syncMode: incremental
target: ${PREFIX}/campaign
{...}