You don’t need a paid connector to display your Facebook/Meta Ads data in Looker Studio. A free Google Apps Script can query Meta’s Marketing API every morning, write the results to a Google Sheet, and Looker Studio connects to that Sheet. It’s the set-up we use for our clients’ daily dashboards — here it is step by step, code included.
This article is the 2026 update of our original guide: the principle hasn’t changed, but the API version and a few fields have.
The principle in one picture
Meta Marketing API → Google Apps Script (triggered every morning) → Google Sheet → Looker Studio
Cost: zero. Maintenance: update the API version roughly once a year and renew the token. In return, you own the pipeline — no monthly subscription to a third-party connector just to display three charts.
Step 1 — Get a long-lived access token
- In Business Manager, create a system user (Business settings → Users → System users).
- Give it access to the relevant ad account (read access is enough:
ads_read).
- Generate a system user token — it doesn’t expire the way a personal token does, which is the whole point.
- Note the ad account ID in the format
act_XXXXXXXXX.
The token gives read access to your advertising data: treat it like a password. It goes in the script properties, never in plain text in shared code.
Step 2 — The Google Sheet and the script
Create a Google Sheet with a data tab, then open Extensions → Apps Script and paste:
// Script properties (Project Settings → Script properties):
// META_TOKEN = your system user token
// ACCOUNT_ID = act_XXXXXXXXX
const API_VERSION = 'v26.0'; // check the current Marketing API version
function fetchMetaInsights() {
const props = PropertiesService.getScriptProperties();
const token = props.getProperty('META_TOKEN');
const account = props.getProperty('ACCOUNT_ID');
const sheet = SpreadsheetApp.getActive().getSheetByName('data');
const fields = 'date_start,campaign_name,spend,impressions,clicks,actions,action_values';
let url = 'https://graph.facebook.com/' + API_VERSION + '/' + account +
'/insights?level=campaign&time_increment=1&date_preset=yesterday' +
'&fields=' + fields + '&access_token=' + token;
const rows = [];
while (url) {
const res = JSON.parse(UrlFetchApp.fetch(url).getContentText());
(res.data || []).forEach(function (d) {
rows.push([
d.date_start,
d.campaign_name,
Number(d.spend || 0),
Number(d.impressions || 0),
Number(d.clicks || 0),
pickAction(d.actions, 'purchase'),
pickAction(d.action_values, 'purchase')
]);
});
url = res.paging && res.paging.next ? res.paging.next : null;
}
if (sheet.getLastRow() === 0) {
sheet.appendRow(['date', 'campagne', 'depense', 'impressions', 'clics', 'achats', 'valeur_achats']);
}
if (rows.length) {
sheet.getRange(sheet.getLastRow() + 1, 1, rows.length, rows[0].length).setValues(rows);
}
}
function pickAction(list, type) {
if (!list) return 0;
const hit = list.find(function (a) { return a.action_type === type; });
return hit ? Number(hit.value) : 0;
}
Fill in META_TOKEN and ACCOUNT_ID in the script properties, run fetchMetaInsights once (authorise the script), and check that the previous day is written to the data tab.
Step 3 — The daily trigger
In Apps Script: Triggers → Add Trigger → function fetchMetaInsights, event “Time-driven”, every day between 6am and 7am. Every morning, the previous day is added to the Sheet. To load your history once, temporarily replace date_preset=yesterday with time_range={'since':'2026-01-01','until':'2026-10-28'}.
Step 4 — Connect Looker Studio
In Looker Studio: Create → Data source → Google Sheets, choose the Sheet and the data tab. Then create two calculated fields:
CPC = depense / clics
ROAS = valeur_achats / depense
And bear in mind what this ROAS is: the one attributed by Meta, with its limitations — we have written about why it shouldn’t steer your budget on its own.
The honest limitations of this set-up
| Limitation |
Impact |
Workaround |
| API version deprecated (~ once a year) |
The script stops |
Update API_VERSION; the error is explicit |
| Meta figures are readjusted 24-48h later |
Slight discrepancy on the previous day |
Reload the last 3 days instead of just the previous day |
| Apps Script quotas |
Negligible at the scale of one account |
A single run per day is more than enough |
| No complex breakdowns (age × placement × creative) |
Limited in-depth analysis |
This pipeline serves daily reporting, not ad hoc exploration |
This set-up powers some of the dashboards we deliver with our campaign management — automatic, updated every morning, and with no connector licence to pay for.
Frequently asked questions
Is it really free?
Yes: the Meta API, Apps Script, Google Sheets and Looker Studio are free for this use. The only cost is the half-hour of set-up and one intervention a year for the API version.
Can I add Google Ads to the same dashboard?
Yes — Looker Studio has a free, native Google Ads connector. In fact, that’s the typical complete set-up: Meta via the Sheet, Google Ads directly, and both sources combined in a single report.
What should I do if the script returns a permission error?
Check that the system user actually has access to the ad account (not just to Business Manager) and that the token includes ads_read. That’s the cause of 90% of failures on the first run.