Home

LinkedIn Ads to BigQuery – How to Connect Apps with and without Coding

Data analysis, reporting, and backup are the major reasons for exporting marketing data from LinkedIn Ads. In this regard, Google BigQuery is considered the perfect repository for voluminous records since it allows you to store data and query it. 

Furthermore, BigQuery can be easily connected to data visualization and business intelligence tools, like Power BI or Looker Studio (formerly Google Data Studio). And how can you get your data from LinkedIn Ads to Google BigQuery? This is what we  cover in this tutorial, so welcome!

What are the options to connect LinkedIn Ads to BigQuery data warehouse?

LinkedIn Ads does not provide any native or built-in integrations. This means you will have to use either third-party integrations or create your own ones. Another option to load LinkedIn Ads data to BigQuery is via the manual CSV export. So, this is the list of options you can use to get data from the LinkedIn advertising platform to BigQuery:

Manual – through a CSV file 

The manual option is the simplest way to move LinkedIn Ads data to Google BigQuery. However, it has one significant drawback – it does not connect LinkedIn Ads to BigQuery. Your campaigns are running, which means they generate more and more data. So, to keep your data in BigQuery up-to-date, you need to download and upload CSV files from LinkedIn ads repeatedly. 

No-code – using a third-party solution

You can automate data refresh on a schedule like every day or every hour to get rid of any manual work. For this, you need to connect LinkedIn Ads to BigQuery using either a third-party connector. Such connectors are provided by different solutions, including Coupler.io, Hevodata, Supermetrics, Stitch, Owox, and so on. They differ in pricing, features provided, frequency of data refresh, and other parameters.

Code – using the LinkedIn Ads API

This option is a fit for developers or tech-savvy marketers who know coding and are ready to learn the LinkedIn Ads API. However, creating a custom integration is just the beginning since you’ll have to spend resources on maintaining it. So, think twice about whether you need to invest your time in this option.

Connect LinkedIn Ads to BigQuery without coding

If you want to automate data exports from LinkedIn Ads to Google BigQuery, we think you’ll love Coupler.io. It’s a reporting automation platform designed to turn raw data into meaningful reports. With Coupler.io, you can automate data flow from LinkedIn Ads to BigQuery in less than 5 minutes. Then, your ads data will flow into your BigQuery tables with the frequency you choose, even up to every 15 minutes! Let’s see how it works in action.

Set up a no-code LinkedIn Ads to BigQuery integration with Coupler.io

Click Proceed in the form below where we’ve preselected LinkedIn Ads as a source and BigQuery as a destination. You’ll be offered to create a Coupler.io account for free. Then configure the chosen apps.

Step 1. Extract data from LinkedIn Ads

  • Connect your LinkedIn account, then select ad accounts from where you want to extract data. Also, you’ll need to select a data category to export. You can load a Report: ad analytics report or raw data (Ad campaigns, Campaign groups, Video Ads, Creatives, Ad account users).

For the raw data, you only need to specify the start date. However, if you’re exporting Report: ad analytics, you’ll need to:

  • Specify the start and end dates of the report period, and choose how you want to see your statistics – view totals or split by day, month, or year.
  • Select metrics and a dimension to include in your report.
1 export linkedin ads data source settings

If you want to load a few data categories from LinkedIn Ads to BigQuery, you’ll need to create separate importers for each. Another option is to combine data from multiple sources to load to a single table. Coupler.io allows you to do this easily – just click Add one more source button before going to the Transform data step.

Step 2. Transform data

Before your LinkedIn data hits the ground of BigQuery, you can preview the information and even transform it. Coupler.io allows you to:

  • Hide, rename, and reorder columns, as well as change their data type.
  • Add new columns using supported calculation formulas.
  • Filter data based on the selected criteria and specified values.
2 transform linkedin data export

LinkedIn Ads raw field names do not look good, so it makes sense to update them so you have analysis-ready data in BigQuery. 

Step 3. Manage data

The last step is to connect your BigQuery project and specify a dataset and a table to load data from LinkedIn Ads. To perform the connection, you’ll need to generate a Google Cloud JSON key and upload it. 

As for the dataset and table – you can create new ones by typing in new names.

bigquery destination

The last thing you need to do is enable automatic data refresh and configure the schedule for it. This will automate data exports from LinkedIn Ads to BigQuery at a chosen frequency, which can be close to real-time – every 15 minutes. You can switch this function on/off at any time later.

4.2 schedule your importer

Click Save and Run to launch the importer and get your LinkedIn Ads data to BigQuery. Let’s check out the data in BigQuery. Click the View Results button, and there you go:

5.linkedin ads bigquery results new

Connect other data sources and destinations with Coupler.io

With Coupler.io, you’re not limited to BigQuery as a destination for your LinkedIn Ads integration. You can also connect your LinkedIn Ads account to spreadsheets (Google Sheets or Microsoft Excel) and BI tools (Looker Studio or Power BI). By the way, check out the ready-to-use dashboard templates designed in Looker Studio. We also have one tailored for LinkedIn Ads! 

LinkedIn Ads dashboard

Among the available BigQuery integrations, you will also find Facebook Ads, Google Ads, TikTok Ads, Salesforce, HubSpot CRM, and many other sources. 

Load LinkedIn Ads data to BigQuery via the API

If the no-code solution does not work for you, you can always connect LinkedIn Ads to BigQuery via the API. However, this  will not be that easy.

To set up a LinkedIn Ads to BigQuery integration via the API, you need to write a script that will:

  1. Fetch specific data in JSON format via the LinkedIn API. 
  2. Upload this data to BigQuery using the BigQuery API.

We’ve already blogged about the second part in How to CRUD BigQuery with Python. As for the first part, you can even do it without coding if you use an API connector like JSON by Coupler.io. Regardless of the code or no-code connection option you go with, you’ll need to get access to the LinkedIn API. For this, a few manipulations are needed:

  • Create a LinkedIn app in your Developer account
  • Get access to LinkedIn Marketing APIs 
  • Generate an access token

Let’s go through each step in detail.

Create a LinkedIn app

3.0 linked in create app
  • Enter the app name, specify the LinkedIn company page, and add the logo for your app. Agree to the API legal terms. Then, click Create app.
3.1 create app required fields
  • Congrats! Your LinkedIn app is now created.
3.2 created linkedin app

Get access to LinkedIn Marketing APIs 

  • On the Products tab, go to Marketing Developer Platform and click Request access.
3.3 linkedin app marketing developer platform request access
  • You will need to fill in an access request form with details about your company’s use case. Beware that LinkedIn grants access to apps that have product-relevant use cases; others will be rejected.
3.4 linkedin app marketing developer platform request access
  • A link to the access request form will appear in a few minutes.
3.5.1 linkedin app marketing developer platform request access
  • Once it is available, it will look like this:
3.5.2 linkedin app marketing developer platform request form link
  • Follow the link and fill in the required fields of the form. 
3.5.3 linkedin app marketing developer platform request form
  • Click Submit to submit the form and wait for access to the Marketing Developer Platform.
3.5.4 linkedin app marketing developer platform request form

Generate an access token

You should not proceed to this step until your access to the Marketing Developer Platform is confirmed. Your Products section on the Marketing Developer Platform should look like this:

3.6 linkedin app marketing developer platform
  • Go to the Auth tab of your application details. Here, you will find app credentials: Client ID and Client Secret. Also, add the following Authorized redirect URIs for your app:
    • https://oauth.pstmn.io/v1/browser-callback
    • https://oauth.pstmn.io/v1/callback
4.0 linkedin app credentials

You’ll need this information to get a LinkedIn token using Postman, a useful no-code tool to work with APIs. Navigate to LinkedIn’s public Postman workspaces.

4.1 linkedin public postman workspaces 1
  • You will see a list of collections, Audiences, Campaign Management, Content APIs, etc. Each collection will have an environment it should be used with. You need to fork the required collection and relevant environment of interest. To do this, click the Click me link for the chosen collection. Then specify the Fork label and choose the workspace. Click Fork Collection.
4.2 linkedin public postman workspaces fork collection
  • You’ll get to Postman’s Get New Access Token request.
4.3 linkedin public postman workspaces
  • Make sure it has the following parameters:
Grant TypeAuthorization Code
Callback URLCheck Authorize using browser
Auth URLhttps://www.linkedin.com/oauth/v2/authorization
Access Token URLhttps://www.linkedin.com/oauth/v2/accessToken
Client ID{insert your client ID}
Client Secret{insert your client secret}
Scoper_basicprofile, r_organization_social,rw_ads, r_ads_reporting, r_ads, w_organization_social, w_member_social, r_1st_connections_size, rw_organization_admin
Client AuthenticationSend client credentials in body 

Click Get New Access Token – you will then see the LinkedIn authorization page where you will need to grant some permissions to your LinkedIn app. 

4.4 linkedin ads app authorization

Note: If you are not logged in to LinkedIn, you must do this first. 

  • Click Allow and return to Postman – here is your access token.
4.5 linkedin ads access token

With the access token obtained, you can send GET requests to the LinkedIn API to export the required data. For this, you need to know endpoints  associated with specific data entities. You can learn more about the information you can retrieve and the respective endpoints here or in the LinkedIn Marketing Developer platform documentation.

Move LinkedIn Ads data to BigQuery manually

Unlike the above-mentioned ways, this one does not actually connect LinkedIn Ads to BigQuery. The manual option allows you to:

  • Download a report as a CSV file from LinkedIn Ads to your computer
  • Upload the CSV file to BigQuery

Let’s see what each part looks like. 

Download a CSV file from LinkedIn Ads

  • Go to the Campaign Manager and select the account for which you will export data.
linkedin app campaign manager 1
  • Click the Export button regardless of the tab you are on – Campaign Groups, Campaigns, or Ads.
linkedin app campaign manager 2
  • Select the desired report to export, choose the Column view and Time breakdown, then click Export
linkedin app export CSV
  • Your LinkedIn Ads data will be downloaded to your computer as a CSV file.
linkedin app campaign manager 3

Upload the LinkedIn Ads CSV file to Google BigQuery 

To upload CSV files to BigQuery, you need to have a BigQuery project with a dataset in it. If you don’t have those created, check out our BigQuery setup guide. It also contains the explanation of how to upload CSV data to BQ, but we’ll recap this here as well:

  • Open your BQ dataset and click Create Table.
Upload the LinkedIn Ads CSV file to Google BigQuery
  • Configure the table as follows:
    • Create table from – choose Upload.
    • Select file – click Browse and select the CSV file exported from LinkedIn Ads.
    • File format – it should be detected automatically, but if not, choose CSV.
    • Table – enter the name of your table
    • Schema – check Auto-detect.
Upload the LinkedIn Ads CSV file to Google BigQuery - settings

There are also advanced options that you may need to set. For example, in our case, we needed to skip four header rows.

Upload the LinkedIn Ads CSV file to Google BigQuery - settings 2

Once ready, click Create table, and welcome your LinkedIn Ads data in BigQuery.

Upload the LinkedIn Ads CSV file to Google BigQuery - table

What’s the best way to sync LinkedIn Ads to BigQuery?

For marketers with low technical expertise, Coupler.io is the best way to connect LinkedIn Ads to BigQuery. It provides an out-of-the-box advanced ETL solution that supports many data sources like Google Analytics, Shopify, Tableau, Mailchimp, etc. With Coupler.io, you can automate data exports from LinkedIn Ads to Google BigQuery with just a few clicks that will only take a few minutes. This is a simple and convenient way to automate LinkedIn Ads reporting.

On the other hand, if you do not have any recurring exporting purposes, a simple native export from LinkedIn Ads will do. It’s plain and simple and won’t cost you a penny.

As for the API, this would be the choice for the bravest category of users. You can do this without coding using the JSON importer by Coupler.io. If you have coding skills and can build a LinkedIn to BigQuery integration from scratch, you may bump into the thorny process of getting access to the LinkedIn Developer Platform. Think twice before you choose this option.

Good luck with your data!

Automate data export with Coupler.io

Get started for free