Getting Started

Back to Documents

Getting Started - Juicy Marbles Ad Automation

For: Jon From: Henrik Date: 2026-03-19

Your Confirmed Stack

Platform Account Region
Meta Ads1 combined accountEU + US
Google AdsAccount 1EU
Google AdsAccount 2US
Google AdsAccount 3UK (retail only)
Shopifyjuicymarbles.comUS
Shopifyeu.juicymarbles.comEU
Polar AnalyticsAll regionsAggregates Shopify + Meta + Google + Klaviyo + 45 more
Klaviyo1 accountAll
Reddit AdsPlannedTBD
TikTok AdsPlannedTBD

Campaign cadence: ~2 seasonal campaigns per month (St Patrick's Day, Easter, etc.)

Where to Start - Priority Order

You don't need to do all of this at once. Each platform connects independently. Start with whichever one you can set up fastest - we'll have an audit report back within 24 hours of receiving each credential.

Step 1: Meta Ads (highest priority)

Your Meta account is one combined account for EU + US. This is where creative fatigue is most likely killing your ROAS, so this is where we start.

What we need from you

  • A System User access token (long string starting with EAA...)
  • Your Ad Account ID (format: act_123456789)

Where to find your Ad Account ID

  1. Go to business.facebook.com
  2. Click the gear icon (bottom-left) to open Business Settings
  3. In the left sidebar, click Accounts then Ad Accounts
  4. Your Ad Account ID is shown next to each account name - it looks like act_123456789
  5. Copy it

How to create a System User token (10 minutes)

  1. You should still be in Business Settings at business.facebook.com/settings
  2. In the left sidebar, click Users then System Users
  3. Click the blue Add button
  4. Give it a name (e.g., "Ad Automation") and set the role to Admin
    • Admin is needed to read ad-level data including creative performance
  5. Click Create System User
  6. Now you need to give it access to your ad account:
    • Click on the system user you just created
    • Click Add Assets
    • Select Ad Accounts from the asset type list
    • Find your Juicy Marbles ad account and check the box
    • Set the permission level to View performance (this is read-only)
    • Click Save Changes
  7. Now generate the token:
    • Click Generate New Token
    • Select the app you want to associate it with (if you don't have one, Meta will prompt you to create one - just use defaults)
    • In the permissions list, check these two:
      • ads_read
      • pages_read_engagement
    • Click Generate Token
    • Copy the token immediately - Meta only shows it once. If you lose it, you'll need to generate a new one.

Important: This token expires after 60 days. When it does, you just repeat step 7 to generate a fresh one. We'll set up a reminder.

Send to Henrik: The token + the Ad Account ID. Use Signal or 1Password - not WhatsApp, not email.

What happens next: We pull campaign/adset/ad-level data for the last 90 days and run creative fatigue detection across all active ads. You'll get a report showing which ads are fatigued, which audiences are saturated, and what to pause.

Step 1b: Polar Analytics (you already have this)

You told us you're already using Polar Analytics and have the Claude MCP set up. Polar pulls together Shopify, Meta, Google Ads, Klaviyo, and 45+ other sources into one warehouse.

What this means for us

  • Polar gives us a single query layer across all your platforms via the MCP
  • We can use it for ad-hoc analysis without needing separate API credentials for each platform
  • Our GitHub Actions automation still connects directly to Meta/Google/Shopify APIs (Polar's MCP is interactive, not batch-scheduled)

What we need from you: Your Polar Analytics API key (bearer token)

Where to find your Polar API key

  1. Log into the Polar Analytics app at app.polaranalytics.com
  2. Click your profile icon or account name (bottom-left of the sidebar)
  3. Go to Settings
  4. Look for the Integrations or API / MCP section
  5. Your API key / bearer token is displayed there - copy it

If you already have the MCP working in Claude, you can also find the token in your Claude MCP settings - it's the same key:

Name: Polar Remote MCP
URL: https://api.polaranalytics.com/mcp
Header: Authorization: Bearer YOUR_API_KEY

Send to Henrik: The API key. Same secure channel as the others.

Since you already have this working in Claude, we can immediately start querying your cross-platform data for the initial audit - no setup wait required.

Step 2: Google Ads (EU + US)

You have separate EU and US accounts. We connect both independently - same process, twice.

What we need from you

  • The Customer ID for each account (format: 123-456-7890)
  • A Developer Token from the Google Ads API Center
  • An OAuth2 refresh token (we'll help with this part)

Part A: Find your Customer IDs (2 minutes)

  1. Go to ads.google.com
  2. If you manage multiple accounts, click the account name at the top to switch between them
  3. The Customer ID is shown at the top of every page, next to your account name - it's a 10-digit number in the format 123-456-7890
  4. Copy the Customer ID for both your EU and US accounts

Part B: Get your Developer Token (5 minutes)

  1. Sign into your Google Ads Manager Account (MCC) at ads.google.com
    • If you don't have a Manager Account, sign into either of your regular accounts
  2. Click the Tools icon (wrench) in the top navigation bar
  3. Under Setup, click API Center
    • Direct URL: https://ads.google.com/aw/apicenter
  4. If this is your first time here, you'll need to fill in a short form to apply for API access:
    • Enter a contact email
    • Select "Tool" or "Internal Tool" as your use case
    • Submit the form
  5. Your Developer Token appears on this page - it's a 22-character alphanumeric string
  6. Copy it

Note: New developer tokens start with "Test Account" access. That's fine for now - we can pull real data from accounts you directly manage. If you already have a developer token from previous API work, use that one.

Part C: OAuth2 Setup (we'll do this together)

This part is a bit more involved - it requires creating a Google Cloud project and generating OAuth credentials. We have two options:

Option 1 (recommended)

Henrik walks you through it on a 15-minute call. You'll share your screen, and we'll set it up together.

Option 2 (if you're comfortable with Google Cloud)

  1. Go to console.cloud.google.com
  2. Create a new project (or use an existing one)
  3. Enable the Google Ads API (search for it in the API Library)
  4. Go to APIs & Services then Credentials
  5. Click Create Credentials then OAuth 2.0 Client ID
  6. Application type: Desktop app
  7. Download the credentials JSON file
  8. Send us the JSON file and we'll generate the refresh token together

Send to Henrik: Both Customer IDs + Developer Token. OAuth setup via call or JSON file.

What happens next: We pull all 16 reports per account - campaigns, keywords, search terms, quality scores, auction insights, device/geo/demographic breakdowns, budget pacing, conversion tracking, and more. You get a prioritized action list - not a spreadsheet, a plain-English summary of what to fix first.

Step 3: Shopify (both stores)

This gives us customer data for audience building - the foundation for lookalike campaigns on Meta and Customer Match on Google.

What we need from you

  • An Admin API access token for each store
  • The store domain for each (e.g., juicymarbles.myshopify.com)

How to create an API token (5 minutes per store)

  1. Log into your Shopify admin for the store (e.g., juicymarbles.myshopify.com/admin)
  2. Go to Settings (bottom-left gear icon)
  3. Click Apps and sales channels
  4. Click Develop apps (at the top of the page)
    • If you see "Allow custom app development" - click it and confirm. This is a one-time toggle.
  5. Click Create an app
  6. Name it something like "Ad Automation" and click Create app
  7. Click the Configuration tab
  8. Under Admin API integration, click Configure
  9. In the scopes list, check these two:
    • read_orders
    • read_customers
    • That's it - nothing else needed
  10. Click Save
  11. Click the API credentials tab
  12. Click Install app (and confirm)
  13. Your Admin API access token is now shown - copy it immediately, Shopify only shows it once

Repeat for your second store (EU or US, whichever you haven't done yet).

These are read-only permissions. We cannot modify products, place orders, or access payment data.

Send to Henrik: Both tokens + both store domains.

What happens next

We export your full order history, run RFM segmentation (Recency, Frequency, Monetary), and build audience CSVs:

  • Top 20% spenders - Meta Lookalike seed + Google Customer Match
  • Champions (recent + frequent + high spend) - Retargeting exclusion (don't waste money on people who already buy)
  • At Risk customers - Win-back campaign targets
  • Lapsed customers - Re-engagement targets

You upload the CSVs to Meta and Google (5 minutes each). After that, the monthly automation rebuilds and emails you fresh files on the 1st of every month.

Step 4: Google Ads UK (retail - separate discussion)

Your UK account is retail-only, which means a different campaign structure (Shopping/PMax) and different optimization strategy. We'll tackle this after the EU/US accounts are connected and audited. Noting it here so it doesn't get lost.

Step 5: Klaviyo (after Shopify is connected)

Once we have your Shopify RFM segments, we can sync them to Klaviyo for targeted email flows:

  • Win-back flows for At Risk customers
  • VIP flows for Champions
  • Restock alerts for products that go in and out of stock (Lamb-ish)

This is Phase 2 work. No credentials needed yet - we'll coordinate when the time comes.

Step 6: Reddit Ads + TikTok Ads (when you're ready)

These are new channels you're about to launch. We'll add them to the monitoring system once they're live. The export scripts are straightforward to build - same pattern as Meta (API pull, CSV, diagnostic engines, email digest).

When you're setting up these accounts, let us know the account IDs and we'll have export scripts ready before your first campaign goes live. That way you get monitoring from day one instead of discovering problems after the budget has been spent.

Quick Reference - What to Send

# Platform What to Send Format Time
1 Meta Ads System User token + Ad Account ID EAA... + act_123456789 10 min
2 Polar Analytics API key (bearer token) Long alphanumeric string 2 min
3 Google Ads (EU) Customer ID + Developer Token 123-456-7890 + 22-char string 5 min
4 Google Ads (US) Customer ID (same Developer Token) 123-456-7890 2 min
5 Shopify (US) Admin API token + store domain Token + juicymarbles.myshopify.com 5 min
6 Shopify (EU) Admin API token + store domain Token + eu.juicymarbles.myshopify.com 5 min

Total time: About 30 minutes across all platforms. You can do them one at a time - we start building as soon as each credential arrives.

What Happens in Week 1

Day What We Do What You See
Day 1Connect first platform (Meta or Google)Confirmation email
Day 1-2Run first auditAudit report in your inbox
Day 3-4Connect second platformSecond audit report
Day 5Set up GitHub Actions automationTest email from the monitoring system
Day 5-7Connect Shopify, build first audience filesAudience CSVs in your inbox

The bottleneck is always credentials. Everything else runs in minutes.

Security

  • Never send API keys via WhatsApp, email, or Slack. Use Signal or a password manager shared vault (1Password, Bitwarden).
  • All credentials are stored as encrypted GitHub Secrets - not visible to anyone once uploaded.
  • Every API connection uses read-only or minimal-write permissions.
  • Meta tokens expire after 60 days and need to be refreshed - we'll remind you.

One Last Thing

Your seasonal campaigns (St Patrick's, Easter, etc.) will benefit most from the creative fatigue detection and audience refresh systems. The sooner we connect Meta, the sooner we can tell you which of your current seasonal creatives are still working and which ones the algorithm has already exhausted.

Next step: Send whichever credential you can set up first. We start there.