The tap-linkedin-ads extractor pulls data from LinkedIn Ads that can then be sent to a destination using a loader.
Alternate Implementations
- Airbyte đ„
- Bytecode IO
- DedicatedToData
- Meltano (default)đ„
- Simon Data
- Stitch Datađ„
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the tap-linkedin-ads extractor to your
project using
:meltano add
-
Configure the tap-linkedin-ads
settings using
:meltano config
-
Test that extractor settings are valid using
:meltano config
meltano add extractor tap-linkedin-ads --variant singer-io
meltano config tap-linkedin-ads set --interactive
meltano config tap-linkedin-ads test
Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities
The current capabilities for
tap-linkedin-ads
may have been automatically set when originally added to the Hub. Please review the
capabilities when using this extractor. If you find they are out of date, please
consider updating them by making a pull request to the YAML file that defines the
capabilities for this extractor.
This plugin has the following capabilities:
- catalog
- discover
- state
You can
override these capabilities or specify additional ones
in your meltano.yml
by adding the capabilities
key.
Settings
The
tap-linkedin-ads
settings that are known to Meltano are documented below. To quickly
find the setting you're looking for, click on any setting name from the list:
You can also list these settings using
with the meltano config
list
subcommand:
meltano config tap-linkedin-ads list
You can
override these settings or specify additional ones
in your meltano.yml
by adding the settings
key.
Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.
Access Token (access_token)
-
Environment variable:
TAP_LINKEDIN_ADS_ACCESS_TOKEN
Your access token.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set access_token [value]
Accounts (accounts)
-
Environment variable:
TAP_LINKEDIN_ADS_ACCOUNTS
A comma separated list of account IDs, e.g. "id1, id2, id3"
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set accounts [value]
Client ID (client_id)
-
Environment variable:
TAP_LINKEDIN_ADS_CLIENT_ID
The API client ID.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set client_id [value]
Client Secret (client_secret)
-
Environment variable:
TAP_LINKEDIN_ADS_CLIENT_SECRET
Your client secret.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set client_secret [value]
Date Window Size (date_window_size)
-
Environment variable:
TAP_LINKEDIN_ADS_DATE_WINDOW_SIZE
The date window to request date from. The default is 30 days.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set date_window_size [value]
Page Size (page_size)
-
Environment variable:
TAP_LINKEDIN_ADS_PAGE_SIZE
The page size for requests. Default, 100.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set page_size [value]
Refresh Token (refresh_token)
-
Environment variable:
TAP_LINKEDIN_ADS_REFRESH_TOKEN
Your refresh token.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set refresh_token [value]
User Agent (user_agent)
-
Environment variable:
TAP_LINKEDIN_ADS_USER_AGENT
The user agent to send with requests.
Configure this setting directly using the following Meltano command:
meltano config tap-linkedin-ads set user_agent [value]
Authentication Setup Details
The tap uses a LinkedIn provided access_token in the config settings to make API requests. Access tokens expire after 60 days and require a user to manually authenticate again. If the tap receives a 401 invalid token response, the error logs will state that your access token has expired and to re-authenticate your connection to generate a new token. This is described more in LinkedIn OAuth 2.0 Docs.
The API user account should be assigned one of the following roles:
- ACCOUNT_BILLING_ADMIN
- ACCOUNT_MANAGER
- CAMPAIGN_MANAGER
- CREATIVE_MANAGER
- VIEWER (Recommended)
The API user account should be assigned the following permissions for the API endpoints:
- accounts, account_users, video_ads, campaign_groups, campaigns, creatives:
- r_ads: read ads (Recommended)
- rw_ads: read-write ads
- ad_analytics_by_campaign, ad_analytics_by_creative:
- r_ads_reporting: read ads reporting
NOTE: Legacy permissions (r_ad_campaigns) have been migrated to the new permissions (r_ads and r_ads_reporting) based on this permissions mapping.
To generate the access_token:
- Login to LinkedIn as the API user.
- Create an API App here:
- App Name: tap-linkedin-ads
- Company: search and find your company LinkedIn page
- Privacy policy URL: link to company privacy policy
- Business email: developer/admin email address
- App logo: Stitch (or Company) logo
- Products: Select Marketing Developer Platform (checkbox)
- Review/agree to legal terms and create app
- Verify App:
- Provide the verify URL to your Company's LinkedIn Admin to verify and authorize the app.
- Once verified, select the App in the Console here.
- Review the âAuthâ tab:
- Record client_id and client_secret (for later steps).
- Review permissions and ensure app has the permissions (above).
- Oauth 2.0 settings: Provide a redirect_uri (for later steps): https://www.google.com
- Review the âProductsâ tab and ensure âMarketing Developer Platformâ has been added and approved (listed in the âadded productsâ section).
- Review the âUsage & limitsâ tab. This shows the daily application and user/member limits with percent used for each resource endpoint.
- Authorize App: The authorization token lasts 60-days before expiring. The tap app will need to be reauthorized when the authorization token expires.
- Create an Authorization URL with the following pattern
- Create a random alphanumeric state_key (used to prevent CRSF).
- URL pattern: Provide the scope from permissions above (with + delimiting each permission) and replace the other highlighted parameters: https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=YOUR_PERMISSIONS_SCOPE&state=YOUR_STATE_KEY
- In web browser, navigate to Authorization URL.
- Once redirected, click âAllowâ to authorize app.
- The browser will be redirected to the redirect_uri. Record the code parameter listed in the redirect URL in the Browser header URL.
- Run the following curl command with the parameters replaced to return your access_token. The access_token expires in 2-months.
> curl -0 -v -X POST https://www.linkedin.com/oauth/v2/accessToken\
-H "Accept: application/json"\
-H "application/x-www-form-urlencoded"\
-d "grant_type=authorization_code"\
-d "code=YOUR_CODE"\
-d "client_id=YOUR_CLIENT_ID"\
-d "client_secret=YOUR_CLIENT_SECRET"\
-d "state=YOUR_STATE_KEY"\
-d "redirect_uri=YOUR_REDIRECT_URI"
Something missing?
This page is generated from a YAML file that you can contribute changes to.
Edit it on GitHub!Looking for help?
#plugins-general
channel.