Connect your data sources
Everything is done in https://<your-hostname>/setup. You never edit files on the server.
Each source below is independent — connect the ones you use, in any order.
Start these two first — they involve approvals by Google / LinkedIn that can take days: the Google Ads developer token (step B) and LinkedIn's Advertising API access.
Google — Ads, Analytics 4, Search Console, Keyword Planner
One connection covers all four. You need a Google account that has access to your Google Ads, GA4 and Search Console, and 20 minutes in Google Cloud Console.
A. Create the OAuth client (Google Cloud Console)
- Go to console.cloud.google.com → create a project (any name).
- APIs & Services → Library → enable: Google Ads API, Google Analytics Data API, Google Analytics Admin API, Google Search Console API.
- APIs & Services → OAuth consent screen
- If your company uses Google Workspace: choose Internal. Done.
- Otherwise choose External, fill in the app name and your email, save — then click Publish app.
- ⚠️ Do not leave it in Testing: Google disconnects testing apps every 7 days.
- APIs & Services → Credentials → Create credentials → OAuth client ID
- Application type: Web application
- Authorised redirect URI: copy it from
/setup → Google(it looks likehttps://<your-hostname>/setup/google/callback) - Save → copy the Client ID and Client secret.
B. Google Ads developer token
- Sign in to Google Ads with a Manager (MCC) account (create one at ads.google.com/home/tools/manager-accounts if you don't have one and link your ad accounts to it).
- Tools → API Center → accept the terms → your developer token appears.
- Click Apply for Basic access and fill in the form (describe: "internal reporting tool"). Approval usually takes 1–3 business days, sometimes longer. Until approved the token only works for test accounts.
C. Connect in /setup
/setup → Google→ paste Client ID, Client secret, developer token, and the Manager account id (10 digits) → Save.- Click Connect Google → sign in with the Google account that has access to your Ads / GA4 / Search Console → Allow everything.
- You land on Choose accounts: tick the ad accounts, pick the GA4 property and the Search Console site → Save selection.
Keyword Planner works automatically once Google Ads is connected. Set your default country/language in /setup → General.
Meta Ads (Facebook / Instagram)
Uses a system user token that never expires. 15 minutes, no Meta review needed.
- business.facebook.com → Settings → Users → System users → Add (name it e.g. "Reporting", role Employee).
- Select the system user → Assign assets → Ad accounts → tick your ad accounts → allow View performance.
- If you do not have a Meta app yet: developers.facebook.com → Create app → type Business → add the Marketing API product. (The app can stay in development mode.)
- Back on the system user → Generate new token → choose the app → permissions: ads_read (add ads_management only if you will use write tools) → expiry: Never → copy the token.
/setup → Meta Ads→ paste the token → Validate & save → tick the ad accounts → Save accounts.
LinkedIn Ads
- developers.linkedin.com → Create app → associate it with your Company Page → verify the page when asked.
- Products tab → request Advertising API. LinkedIn reviews this (days to a few weeks). Start early.
- Auth tab → under Authorized redirect URLs add the URL shown in
/setup → LinkedIn Ads→ copy the Client ID and Client Secret. /setup → LinkedIn Ads→ paste them → Save → Connect LinkedIn → sign in with a LinkedIn user who has access to the ad accounts → Allow.- Tick the ad accounts → Save accounts.
The connection renews itself. If LinkedIn ever stops it, the dashboard shows a "reconnect" notice.
Shopify
- Shopify admin → Settings → Apps and sales channels → Develop apps → Allow custom app development (once) → Create an app (name: "Marketing reporting").
- Configure Admin API scopes → tick
read_orders,read_all_orders,read_products,read_customers→ Save. - Install app → Reveal token once → copy the Admin API access token (starts with
shpat_). It is shown only once. /setup → Shopify→ enter your*.myshopify.comdomain and the token → Validate & save.
Salesforce
Ask your Salesforce admin — 20 minutes.
- Setup → App Manager → New Connected App → name it "Marketing reporting", contact email.
- Tick Enable OAuth Settings, callback URL
https://localhost(unused), scopes: Manage user data via APIs (api). - Tick Enable Client Credentials Flow → Save (wait a few minutes for it to activate).
- Manage → Edit Policies → under Client Credentials Flow pick a Run As user (an integration user with read access to Leads and Opportunities) → Save.
- Manage Consumer Details → copy the Consumer Key and Consumer Secret.
/setup → Salesforce→ instance URL (e.g.https://yourorg.my.salesforce.com), key, secret → Validate & save.- Review the LeadSource → channel table it shows (which lead sources are Google Ads, Meta, LinkedIn, organic, …) → Save mapping. This is what makes "cost per lead by channel" work.
Check everything
Dashboard → each connected source has a Test button. Green = data is flowing. Then, in Claude: "Run list_sources — what's connected?"