How to connect Facebook Ads to Power BI?

connect facebook ads to power bi

One of the reasons Facebook is such a popular and successful marketing platform is the fact that it provides detailed insight and that allows marketeers to scale and optimize their campaigns with ease. Here we are going to explain how to connect Facebook Ads to Power BI.
It is very simple to connect Facebook leads to Power BI, it can be done in a jiffy with
Having fresh Facebook Ads in Power BI is very useful. Especially in case you are investing heavily into Facebook and Power BI is your central reporting platform. In this article we’ll explain how to get both platforms connected. The whole process should not take more than 5 minutes and you can choose between >200 different dimensions and metrics from Facebook Ads.

How to connect Facebook leads to Power BI?

As prerequisite, you’ll need a account which you can get here.

1. First, you need to select Facebook Ads as Data Source and Grant Facebook Access to

connect facebook ads to power bi

2. Connect your Facebook Ads account to and copy your API key that appears in the top right corner. 

facebook ads to power bi 1

3. Use the following URL[your API key]&date_from=2021-01-18&fields=campaign,clicks,spend,impressions,date,source&_renderer=csv

where the  [your API Key] with your API key. The fields which are listed after &fields= are simply a set of standard fields which you can customise. A full list of metrics and dimensions can be found in our Facebook Ads connector documentation. Customise the URL to your liking. If you want to query a specific date range you can do so by changing &date_from= to the start date. Additionally you can also add in &date_to= (at the end of the URL) and specify the end date.

 Lead campaign is one type of a Facebook campaign, you just need to select Lead Generation as a campaign objective. Then you can collect customer data via a lead form. This data will then be available in the Facebook Ads Manager reports and you will be able to integrate it into Power BI. Keep reading through the steps to learn how to connect Facebook leads to Power BI.

4. In Power BI click on Get data -> Web and copy-paste the URL into the URL field. This URL now works as a data feed. If you want to add or remove fields, simply adjust the URL as described in step 2. Now a window will open where you click Connect.

5. Now your data should appear in Power BI. Click load and configure it.facebook ads to power bi 2

Important You will need to change the fields to their types (e.g. date, decimals, whole numbers, …) to use them in aggregations (sums, averages, …) or date filters. For users in Europe and other countries where a comma is used for decimals please change the locale of the data to English.

​​How long does it take?

Now that we’ve explained how to connect Facebook leads to Power BI, you can see that the process is very simple and the best part is that it will take you only about 5 minutes to set up everything and be able to analyze your Facebook data in Power BI.

What data can I investigate with this report?

If you go back to step 3 you will see the default fields that you can analyse, but that’s just a fraction of what is actually available to you. Namely, you can analyse every metric that is available in Facebook Ads Manager, so whether that is cost per mile, conversions, or you would like to separate your audience by geo, gender, or age, all of that will be possible with our solution.
Let’s say that you want to see how your campaign performed in different countries or regions. You can customise your Facebook Ads Manager data and once you integrate it into Power BI you can visualise and directly see the difference between conversions, cost per mile, CPC and every metric that you want to compare. Facebook Ads Manager offers access to an amazing set of categories and metrics, but it is not a visualisation tool and even if you download the reports and open them in Excel or Google Sheets, it still wouldn’t be very presentable. Once you connect Facebook Ads to Power BI you will be able to present your data and findings in a much user-friendlier manner even to people who are not familiar with the marketing side of Facebook.

About Power BI

Power BI isn’t just a visualisation tool, it is a service offered by Microsoft, it has a very simple interface and in addition to visualisations it also has business intelligence capabilities. There is a Power BI desktop and a Power BI web service, you can use either or both depending on your preference.

You can create interactive reports and model your data as you prefer and if you have used any Office product, working in Power BI will come naturally to you.

About Facebook Ads

Facebook Ads, via Facebook Ads Manager is the platform that allows you to use Facebook as a marketing tool. You can target users based on their geolocation, their gender, age or a range of other characteristics. It is possible to build custom audiences, but it is also possible to build audiences based on their interests as well as lookalike audiences.

A lookalike audience is an audience which is created by Facebook based on an existing audience data provided by you. Facebook uses the data it has on the existing base audience to create a group that matches it. If the base audience are your customers, it is likely that the lookalike audience will have a high conversion rate.
If your goal is to collect leads, you can do that as well and we already explained how to connect Facebook leads to Power BI in the detailed step-by-step process above.