Skip to main content

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:

  1. OAuth2.0 credentials, consisting of:

    • Client ID
    • Client Secret
    • Refresh Token (expires after 12 months)
  2. 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

  1. Log in to LinkedIn with a developer account.

  2. Navigate to the Apps page and click the Create App icon. Fill in the fields below:

    1. For App Name, enter a name.
    2. For LinkedIn Page, enter your company's name or LinkedIn Company Page URL.
    3. For Privacy policy URL, enter the link to your company's privacy policy.
    4. For App logo, upload your company's logo.
    5. 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.
  3. You can verify your app using the following steps:

    1. 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.

    2. 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

  1. 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.

  2. Click the OAuth 2.0 tools link in the Understanding authentication and OAuth 2.0 section on the right side of the page.

  3. Click Create token.

  4. 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
  5. 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.

caution

These tokens will not be displayed again, so make sure to copy them and store them securely.

tip

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

  1. Log in to your Airbyte Cloud or Airbyte Open Source account.
  2. In the left navigation bar, click Sources. In the top-right corner, click + New source.
  3. Find and select LinkedIn Ads from the list of available sources.
  4. For Source name, enter a name for the LinkedIn Ads connector.
  5. 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:
    1. OAuth2.0: Enter your Client ID, Client Secret and Refresh Token. Please note that the refresh token expires after 12 months.
    2. Access Token: Enter your Access Token. Please note that the access token expires after 60 days.
  1. 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.
  2. (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.
  3. (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:
    1. Click on Add.
    2. Enter a Report Name. This will be used as the stream name during replication.
    3. Select a Pivot Category from the dropdown. This defines the main dimension by which the report data will be grouped or segmented.
    4. 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.
  4. Click Set up source and wait for the tests to complete.

Supported sync modes

The LinkedIn Ads source connector supports the following sync modes:

Supported streams

info

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 TypeAirbyte TypeNotes
numbernumberfloat number
integerintegerwhole number
datestringFORMAT YYYY-MM-DD
datetimestringFORMAT YYYY-MM-DDThh:mm: ss
arrayarray
booleanbooleanTrue/False
stringstring

Changelog

VersionDatePull RequestSubject
0.6.22023-08-2329600Increase max time between messages to 24 hours
0.6.12023-08-2329600Update field descriptions
0.6.02023-08-2229721Add Conversions stream
0.5.02023-08-1429175Add Custom report Constructor
0.4.02023-08-0829175Add analytics streams
0.3.12023-08-0829189Fix empty accounts field
0.3.02023-08-0729045Add new fields to schemas; convert datetime fields to rfc3339
0.2.12023-05-3026780Reduce records limit for Creatives Stream
0.2.02023-05-2326372Migrate to LinkedIn API version: May 2023
0.1.162023-05-2426512Removed authSpecification from spec.json in favour of advancedAuth
0.1.152023-02-1322940Specified date formatting in specification
0.1.142023-02-0322361Turn on default HttpAvailabilityStrategy
0.1.132023-01-2722013for adDirectSponsoredContents stream skip accounts which are part of organization
0.1.122022-10-1818111for adDirectSponsoredContents stream skip accounts which are part of organization
0.1.112022-10-0717724Retry 429/5xx errors when refreshing access token
0.1.102022-09-2817326Migrate to per-stream states.
0.1.92022-07-2114924Remove additionalProperties field from schemas
0.1.82022-06-0713495Fixed base-normalization issue on Destination Redshift caused by wrong casting of pivot column
0.1.72022-05-0412482Update input configuration copy
0.1.62022-04-0411690Small documentation corrections
0.1.52021-12-218984Update connector fields title/description
0.1.42021-12-028382Modify log message in rate-limit cases
0.1.32021-11-117839Added OAuth support
0.1.22021-11-087499Remove base-python dependencies
0.1.12021-10-026610Fix for Campaigns/targetingCriteria transformation, coerced Creatives/variables/values to string by default
0.1.02021-09-055285Initial release of Native LinkedIn Ads connector for Airbyte