LinkedIn Ads
This page contains the setup guide and reference information for the LinkedIn Ads source connector.
Prerequisites
- A LinkedIn Ads account with permission to access data from accounts you want to sync.
Setup guide
We recommend using Oauth2.0 authentication for Airbyte Cloud, as this significantly simplifies the setup process, and allows you to authenticate your account directly from the Airbyte UI.
Set up LinkedIn Ads authentication (Airbyte Open Source)
To authenticate the connector in Airbyte Open Source, you will need to create a Linkedin developer application and obtain one of the following credentials:
-
OAuth2.0 credentials, consisting of:
- Client ID
- Client Secret
- Refresh Token (expires after 12 months)
-
Access Token (expires after 60 days)
You can follow the steps laid out below to create the application and obtain the necessary credentials. For an overview of the LinkedIn authentication process, see the official documentation.
Create a LinkedIn developer application
-
Log in to LinkedIn with a developer account.
-
Navigate to the Apps page and click the Create App icon. Fill in the fields below:
- For App Name, enter a name.
- For LinkedIn Page, enter your company's name or LinkedIn Company Page URL.
- For Privacy policy URL, enter the link to your company's privacy policy.
- For App logo, upload your company's logo.
- Check I have read and agree to these terms, then click Create App. LinkedIn redirects you to a page showing the details of your application.
-
You can verify your app using the following steps:
-
Click the Settings tab. On the App Settings section, click Verify under Company. A popup window will be displayed. To generate the verification URL, click on Generate URL, then copy and send the URL to the Page Admin (this may be you). Click on I'm done. If you are the administrator of your Page, simply run the URL in a new tab (if not, an administrator will have to do the next step). Click on Verify.
-
To display the Products page, click the Product tab. For Marketing Developer Platform, click Request access. A popup window will be displayed. Review and Select I have read and agree to these terms. Finally, click Request access.
-
Authorize your app
-
To authorize your application, click the Auth tab. Copy the Client ID and Client Secret (click the open eye icon to reveal the client secret). In the Oauth 2.0 settings, click the pencil icon and provide a redirect URL for your app.
-
Click the OAuth 2.0 tools link in the Understanding authentication and OAuth 2.0 section on the right side of the page.
-
Click Create token.
-
Select the scopes you want to use for your app. We recommend using the following scopes:
r_emailaddress
r_liteprofile
r_ads
r_ads_reporting
r_organization_social
-
Click Request access token. You will be redirected to an authorization page. Use your LinkedIn credentials to log in and authorize your app and obtain your Access Token and Refresh Token.
These tokens will not be displayed again, so make sure to copy them and store them securely.
If either of your tokens expire, you can generate new ones by returning to LinkedIn's Token Generator. You can also check on the status of your tokens using the Token Inspector.
Set up the LinkedIn Ads connector in Airbyte
- Log in to your Airbyte Cloud or Airbyte Open Source account.
- In the left navigation bar, click Sources. In the top-right corner, click + New source.
- Find and select LinkedIn Ads from the list of available sources.
- For Source name, enter a name for the LinkedIn Ads connector.
- To authenticate:
For Airbyte Cloud
- Select OAuth2.0 from the Authentication dropdown, then click Authenticate your LinkedIn Ads account. Sign in to your account and click Allow.
For Airbyte Open Source
- Select an option from the Authentication dropdown:
- OAuth2.0: Enter your Client ID, Client Secret and Refresh Token. Please note that the refresh token expires after 12 months.
- Access Token: Enter your Access Token. Please note that the access token expires after 60 days.
- For Start Date, use the provided datepicker or enter a date programmatically in the format YYYY-MM-DD. Any data before this date will not be replicated.
- (Optional) For Account IDs, you may optionally provide a space separated list of Account IDs to pull data from. If you do not specify any account IDs, the connector will replicate data from all accounts accessible using your credentials.
- (Optional) For Custom Ad Analytics Reports, you may optionally provide one or more custom reports to query the LinkedIn Ads API for. By defining custom reports, you can better align the data pulled form LinkedIn Ads with your particular needs. To add a custom report:
- Click on Add.
- Enter a Report Name. This will be used as the stream name during replication.
- Select a Pivot Category from the dropdown. This defines the main dimension by which the report data will be grouped or segmented.
- Select a Time Granularity to group the data in your report by time. The options are:
ALL
: Data is not grouped by time, providing a cumulative view.DAILY
: Returns data grouped by day. Useful for closely monitoring short-term changes and effects.MONTHLY
: Returns data grouped by month. Ideal for evaluating monthly goals or observing seasonal patterns.YEARLY
: Returns data grouped by year. Ideal for high-level analysis of long-term trends and year-over-year comparisons.
- Click Set up source and wait for the tests to complete.
Supported sync modes
The LinkedIn Ads source connector supports the following sync modes:
- Full Refresh - Overwrite
- Full Refresh - Append
- Incremental Sync - Append
- Incremental Sync - Append + Deduped
Supported streams
- Accounts
- Account Users
- Campaign Groups
- Campaigns
- Creatives
- Conversions
- Ad Analytics by Campaign
- Ad Analytics by Creative
- Ad Analytics by Impression Device
- Ad Analytics by Member Company Size
- Ad Analytics by Member Country
- Ad Analytics by Member Job Function
- Ad Analytics by Member Job Title
- Ad Analytics by Member Industry
- Ad Analytics by Member Region
- Ad Analytics by Member Company
For Analytics Streams such as Ad Analytics by Campaign
and Ad Analytics by Creative
, the pivot
column name is renamed to _pivot
to handle the data normalization correctly and avoid name conflicts with certain destinations.
Performance considerations
LinkedIn Ads has Official Rate Limits for API Usage, more information here. Rate limited requests will receive a 429 response. These limits reset at midnight UTC every day. In rare cases, LinkedIn may also return a 429 response as part of infrastructure protection. API service will return to normal automatically. In such cases, you will receive the following error message:
"Caught retriable error '<some_error> or null' after <some_number> tries. Waiting <some_number> seconds then retrying..."
This is expected when the connector hits the 429 - Rate Limit Exceeded HTTP Error. If the maximum available API requests capacity is reached, you will have the following message:
"Max try rate limit exceeded..."
After 5 unsuccessful attempts - the connector will stop the sync operation. In such cases check your Rate Limits on this page > Choose your app > Analytics.
Data type map
Integration Type | Airbyte Type | Notes |
---|---|---|
number | number | float number |
integer | integer | whole number |
date | string | FORMAT YYYY-MM-DD |
datetime | string | FORMAT YYYY-MM-DDThh:mm: ss |
array | array | |
boolean | boolean | True/False |
string | string |