cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Pulling Data from Facebook Ad Campaigns

Hey There!

 

Is is possible to pull data from Facebook's Ad Services? Example running a campaign and being able to pull the data it's collecting on engagement?

 

Thanks

Derek

8 REPLIES 8
Highlighted
Community Champion
Community Champion

Re: Pulling Data from Facebook Ad Campaigns

@dkbollig you can check out in-built facebook connector to see if it does that. Also you can use APIs if you can find facebook APIs that returns data that you're after.

Highlighted
Responsive Resident
Responsive Resident

Re: Pulling Data from Facebook Ad Campaigns

I've build a custom data connector for Facebook Ads 

 

You can just copy the mez file from https://github.com/Hugoberry/FacebookAds/tree/master/build into your 

 [My Documents]\Microsoft Power BI Desktop\Custom Connectors directory

and enable custom connectors in Power BI.

 

The FacebookAds connector now supports two functions. The initial functionality FacebookAds.Campaigns() will return you the insights for your campaigns.

 

output.PNG

The Second function FacebookAds.API(uri,params) is more of a credentials wrapper for the enitre MarketingAPI. You can tailor your requests as you want with it.

Highlighted
New Member

Re: Pulling Data from Facebook Ad Campaigns

Hey...I just tried using this and got this error (replaced token with xxxxxxx).

 

DataSource.Error: Web.Contents failed to get contents from 'https://graph.facebook.com/v2.11/act_59096518/campaigns?access_token=xxxxxxx&fields=name' (400): Bad Request
Details:
    DataSourceKind=FacebookAds
    DataSourcePath=FacebookAds
    Url=https://graph.facebook.com/v2.11/act_59096518/campaigns?access_token=xxxxx&fields=name

 

Let me know if I'm missing something

Highlighted
New Member

Re: Pulling Data from Facebook Ad Campaigns

DataSource.Error: Web.Contents failed to get contents from 'https://graph.facebook.com/v2.11/act_71**9815*******/campaigns?access_token=******=name' (400): Bad Request
Details:
DataSourceKind=FacebookAds
DataSourcePath=FacebookAds
Url=https://graph.facebook.com/v2.11/act_71***99****/campaigns?access_token=********=name

Highlighted
Resolver II
Resolver II

Re: Pulling Data from Facebook Ad Campaigns

Hi All,

 

You can go to my github page and download the Facebook Campaign Analytics PBI template. Open the template, add some inputs and your are done, you can analyze your Facebook campaigns, ad sets and ads easily through this template.

 

https://github.com/ranmax123/powerbi/tree/master/facebook%20marketing%20api%20power%20bi%20template

 

More in my blog post: https://bigintsolutions.com/2018/05/07/the-ultimate-power-bi-template-for-analyzing-your-facebook-ca...

 

If you have any questions, please open up an issue in github.

 

Thanks,

Ranbeer

Highlighted
Anonymous
Not applicable

Re: Pulling Data from Facebook Ad Campaigns

Hi @hugoberry,

 

I installed your connector and works like a charm. Just wanted to ask how can I sign out or change facebook user. I tried by clearing permissions but still remembers the first user I entered so there's no way to sign in with another user. https://www.screencast.com/t/vjk7d7FYb 

 

Is there any way to make a reset?

Thanks

Raul.

 

Highlighted
Helper II
Helper II

Re: Pulling Data from Facebook Ad Campaigns

@dkbollig @Anonymous @ranbeermakin @saisatya @stodds 

I just released a new version of my open sourced Facebook Ads connector.

The new release includes support for scheduled refresh on powerbi.com

A ready-to-go connector is available for download on my sponsor Scitylana's website, https://www.scitylana.com/connectors

Link to Gihub is available here.

Highlighted
Frequent Visitor

Re: Pulling Data from Facebook Ad Campaigns

@michaelbilling 
I have connected FB ads data successfully using your connector.

But PBI service powerbi.com could not refresh data.

Could you suggest any solution for this error.

Thank you

 

Error:

You can't schedule refresh for this dataset because the following data sources currently don't support refresh:

  • Data source for "Facebook All Ad Insights Last 90 days"
  • Data source for "Facebook All Ad Insights"

 

Query contains unknown function name: FacebookAds.Ads Unknown function name: FacebookAds.Ads is a valid Mashup library function name format. Hence fail the operation.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors