Connector Facebook Ads
The Facebook Ads connector allows you to integrate your Facebook Ads account with Meiro Integrations and extract data about your ads (including adsets and campaigns) and ad insights from your Facebook Ad account.
Facebook Advertising aka Facebook Ads is Facebook’s advertising platform that offers businesses the ability to create paid advertisements that targets their audiences across Facebook’s social media platforms, i.e. Facebook, Messenger, and Instagram.
Requirements
To set up and run a Facebook Ads connector, you will need:
- The Facebook Ad account that you want to extract your ad campaign data from.
- A Facebook account that is authorised to access this Facebook Ad account.
- The ID of the Ad account that you want to extract data from.
- The ID of the Facebook page that you are creating ads from.
Features
The Facebook Ads connector is built on the base of the Facebook Marketing API.
This marketing API offers an extensive list of parameters and fields that you can extract from its endpoint for reporting and analytics.
Data In/Data Out
Data In |
N/A |
Data Out |
When successfully run, all data queried will be output into CSV tables in the Warning: There will be no data output for the specified account if it is inactive. |
Learn more: about the folder structure here.
Authorization
In order to connect to the Facebook Marketing API and successfully extract data from your Facebook Ads account, the account needs to be authenticated and be granted various permissions from Facebook in order to gain access to its ads and ad insights.
Learn more: about access and authentication here.
Additionally, the user creating the Facebook Ads connector needs to have authorized access to the Facebook Ads account. You can contact the admin of your Facebook page and ask them to grant you access.
You can check if you have been granted access to your Facebook Ads account by logging into your Facebook account and clicking on the drop-down arrow located on the Facebook toolbar.
Clicking on that arrow should display a drop-down menu that should show you which Facebook pages you have been authorized to view and manage. You should be able to view links to create and manage Ads.
Once you have created your Facebook Ads connector on Meiro Integrations, you will be required to authorize it to access your Facebook account.
You can reset your connector’s authorization at any time or if you want to authorize another Facebook ad account instead.
Parameters
ID (required) |
Specify the ID string of the Facebook Ad account that you want to extract data from. You can locate this ID by logging into your Facebook account, clicking on the drop-down arrow and clicking on Business Manager. On the Business Manager page, you should be able to see a table for Ad accounts (if you don’t see this table, contact your admin to ensure you have been given access to your Facebook page’s ad accounts).
Under Ad accounts, you should be able to see the ad accounts linked to your Facebook page. Each ad account has its own unique ID found under its name.
As the ID field is a string, it should be specified like this: So for example, if your ad account id is |
Name (required) |
This is where you specify the name of the Ad account. |
Currency (required) |
This is where you specify the particular currency that you want to view ad costs in. |
Account ID (required) |
This is where you specify the ID of the ad account. |
Business Name (required) |
This is where you specify the business name that the ad account is associated with. |
API Version (required)
|
Set this field to the latest version that the Facebook Marketing API is currently running on. |
Query
Name (required) |
This field describes the query that you want to make. Whatever name you have decided to use in this field will also be prefixed to the queried table-names in the Data Out bucket. The only exception is when the name used in this field also matches the name of the corresponding endpoint that you want to query (e.g. when you’re querying campaign data and you describe this query as |
Type (required) |
This field refers to the type of query you want to make. Currently, the only type of query that exists is nested-query and this field is therefore defined as such by default. Learn more: about making nested queries here. |
Path (optional) |
This field refers to the endpoint URL part of the request that is made to the Facebook Marketing API. The absolute URL looks like: If this field is left empty, the API would extract from the root node which would be the page itself. Learn more: List of the supported Facebook Marketing API endpoints here. |
Fields (required) |
This is where you specify a set of parameters that you want to specifically query from your endpoint. For example, data about a single ad contains fields such as
You can also add additional parameters within these fields by separating them with periods followed by the parameter name and the value in brackets.
An example query that includes additional parameters would look something like this:
|
IDs (required) | This field specifies the account(s) that the query will be applied to. You can specify one or more ad account IDs (separated by commas). |
Limit (optional) | This field refers to the Facebook Marketing API request parameter limit and returns the maximum number of objects that can be returned on a single page of request. It is defined as 25 by default but the maximum limit that can be specified is 100. |
Since (optional) |
This field corresponds to the Facebook Marketing API’s time range parameters. You can use this field to specify a range of the data that you want to collect from your endpoint and can be specified relatively (e.g.10 days ago) or absolutely (in the DD-MM-YYYY format). Leaving this field empty will not affect your queried data. |
Until (optional) |
This field functions in a similar way as the Use this field to specify until which particular date you want to extract your data. This field can also be specified relatively (e.g.10 days ago) or absolutely (in the DD-MM-YYYY format). Leaving this field empty will also not affect your queried data.
|