TutorialPractitioner13 min read

Analysing GA4 and Ad Platform CSV Exports With Claude

Analyse GA4, Google Ads and Meta exports with Claude: clean CSVs, find what changed, build charts and write a report your team will read.

Dipuck Jones
Written by Founder of MentionX · 13+ years in B2B SaaS growth and SEO
Reviewed
Short answer

Claude can analyse marketing exports far faster than a spreadsheet session, because it writes and runs its own analysis code, shows you the numbers and explains what changed. Export clean CSVs from GA4, Google Ads or Meta, describe the business question, ask Claude to check the data before analysing it, and have it show its working. Code execution is available on every Claude plan, including Free. Claude is reliable at arithmetic it runs in code and less reliable at interpretation, so treat its explanations as hypotheses to check, not conclusions.

Key takeaways
  • Code execution lets Claude calculate from your file, so arithmetic is dependable.
  • Export clean, single-table CSVs and ask Claude to inspect the data before analysing.
  • State the decision you need to make and set a minimum-volume threshold.
  • Label explanations 'likely' or 'confirmed', and ask for alternative causes.

Checked 3 November 2026 (CET) against Anthropic help and docs pages. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.

01What can Claude do with a marketing CSV?

With code execution and file creation turned on, Claude works in a sandboxed computing environment where it can write Python, process CSV and other data files, and create charts as image files (Anthropic). Anthropic says this is available to all users on the web, desktop and mobile apps, and you'll find the switch under Settings > Capabilities.

In practice, that means you can upload a campaign export and ask a plain-language question such as "Which campaigns lost the most conversions month on month, and why?" Claude will load the file, check the columns, calculate the comparison and produce a table and chart. Because the numbers come from code it ran, rather than from the model estimating, the arithmetic is dependable. You can ask to see the code if you want to check exactly how it calculated something.

Chat uploads can be large: Anthropic lists 500 MB per file and up to 20 files per chat (Anthropic). Most marketing exports are far smaller, but it's useful for raw event or keyword data.

Our view: the biggest gain isn't speed. It's that you can ask follow-up questions in seconds, so you explore the data properly instead of stopping at the first chart.

02How do you export data that Claude can use well?

Clean inputs save more time than clever prompts. A few habits help:

  • One table per file. Export a single report, not a dashboard with several tables stacked in one sheet.
  • Keep the header row simple. GA4 and ad platform exports often include summary rows or notes at the top. Delete them, or tell Claude to skip them.
  • Include dates as a column. Export by day or week rather than as a single total, so Claude can find trends.
  • Use consistent date ranges. For comparisons, export both periods with the same dimensions and metrics.
  • Name files clearly. "ga4_channels_2026-09_2026-10.csv" tells Claude more than "export (3).csv".
  • Leave out personal data. Aggregated reports rarely contain any, but check user-level exports carefully.

For GA4, the Explore reports give you more control over dimensions than standard reports. For Google Ads and Meta, a campaign or ad set report by day with spend, impressions, clicks, conversions and conversion value covers most questions.

03How do you check the data first?

Always ask Claude to inspect the file before analysing it. This catches export problems that would otherwise give you confident wrong answers.

<upload: google_ads_campaigns_by_day.csv>

Before any analysis, inspect this file:
- Columns, data types and date range
- Missing values, duplicates, summary or total rows
- Any currency, percentage or number formatting issues
- Totals for spend, clicks and conversions
Tell me anything that looks wrong. Don't analyse yet.

Compare the totals with your platform. If they match, you can trust the rest. If they don't, fix the export before going further.

04How do you ask the business question?

State what you want to decide, not just what you want calculated. Anthropic's prompting guidance stresses giving Claude context about the goal and the audience, because it uses that context to make better choices (Anthropic).

Context: We're a B2B software company. Our goal is qualified
demo requests (conversion action "Demo request"). Budget is
fixed for next month and I need to decide where to move spend.

Using this export:
1. Compare October with September by campaign: spend, conversions,
   cost per conversion and conversion rate.
2. Identify the 3 biggest changes in conversions and what drove
   each (clicks, conversion rate or both).
3. Flag campaigns with too little data to judge (under 20
   conversions in either month).
4. Recommend budget moves, with reasoning and risks.
Show tables and one chart. Explain calculations briefly.

The rule about low-volume campaigns is important. Claude will happily calculate a 300% improvement from one conversion to four, and the chart will look impressive. Tell it what counts as enough data for your account.

05How do you explore what changed?

The first answer usually raises questions. Ask them one at a time:

  • "Break the drop in organic sessions down by landing page. Which ten pages lost the most?"
  • "Is the conversion rate fall in paid social on mobile, desktop or both?"
  • "Which day did the change start? Plot daily conversions with a 7-day average."
  • "Separate brand and non-brand campaigns and repeat the comparison."

This is where Claude saves the most time. Each follow-up takes seconds instead of a new pivot table. Keep the analysis in one chat so Claude can reuse the cleaned data, and start a new chat when you switch to a different dataset.

06How do you analyse GA4 channel data for AI traffic?

AI assistants increasingly send visitors to websites, and GA4 doesn't group them separately by default. If you've set up a custom channel group or regex filter for AI referrers, export sessions and conversions by that channel and ask Claude to track the trend. Our guides explain how to track AI traffic in GA4 and set up a GA4 custom channel group for AI referrals.

This export has sessions, engaged sessions and key events by
session source and week. Group these sources as AI assistants:
[list your regex or sources]. Show weekly AI sessions, their
share of all sessions, engagement rate and key events, compared
with organic search. Note any source with too few sessions to
read reliably.

Expect small numbers for most sites, and treat weekly swings with caution.

07How do you turn the analysis into a report?

Ask for a short written summary aimed at a specific reader, then the supporting charts.

Write a one-page summary for our head of marketing:
- 3 key findings, each with the number that supports it
- What we think caused each, labelled as "likely" or "confirmed"
- 2 recommended actions with expected impact and risk
- What we don't know yet and how we'd find out
Keep it under 300 words. Then attach the 3 most useful charts.

The "likely" or "confirmed" label is the most useful line here. It stops a hypothesis from turning into a fact as the report travels around the company. Claude can also create the report as a Word, PDF or PowerPoint file you download (Anthropic).

08Where does Claude's interpretation go wrong?

The calculations are usually right; the explanations need care. Common issues:

  • Correlation read as cause. Conversions fell when a new ad launched, so Claude blames the ad. Check other changes in the same week: tracking updates, site releases, seasonality.
  • Missing context. Claude doesn't know you changed attribution settings, ran a sale or had a site outage. Tell it.
  • Platform differences. GA4 and ad platforms count conversions differently. Ask Claude to compare like with like.
  • Small samples. Even with your threshold, a ranking of ten campaigns can change completely next month.

A useful habit is to end each analysis with: "What are three other explanations for these results that I should rule out?"

09What about live data instead of exports?

Exports are simplest and keep you in control. On paid plans, Anthropic's Claude Dashboards beta can connect to data platforms such as BigQuery or Snowflake and build dashboards that stay current, with each chart showing the query behind it (Anthropic). If your marketing data already flows into a warehouse, that's worth exploring with your data team. Lesson 13 covers connectors more generally.

10From MentionX data: AI referrals in the wider pictureOriginal data

Method. Read-only aggregate queries over MentionX scans from 22 August to 29 October 2026 (UTC): 2,217 engine runs (2,154 completed) across 18 anonymised projects and six engines.

When you add AI referrals to your channel analysis, it helps to know which engines send visitors and cite pages. MentionX's cross-engine aggregates show how engines differ in the prompts we track:

EngineBrand mentionedAnswers with no citations
Gemini47.3%50.7%
OpenAI42.9%30.2%
Perplexity31.5%4.1%
AI Mode31.3%12.6%
Copilot26.0%47.0%
DeepSeek24.0%99.0%

Our view: report AI traffic separately even while it's small. The trend matters more than the current share, and you can't see a trend you haven't been tracking.

Limits. A convenience sample of mostly B2B software projects, run through engine APIs, which can behave differently from the consumer apps. Perplexity, Copilot and DeepSeek figures come from a single day (26 October 2026), so treat them as a snapshot, not a trend.

11Worked example: Ledgerline's October review

Ledgerline is a fictional accounts-payable tool. Figures are illustrative.

Ledgerline's performance marketer uploads a Google Ads export by day for September and October. The inspection finds a totals row at the bottom, which would have doubled every figure; Claude excludes it, and the totals then match the platform.

The analysis shows demo requests fell in one non-brand campaign. Follow-up questions find the fall was entirely on mobile and began on a single day. Asked for other explanations, Claude suggests checking for a site change, and the marketer finds that a form update that day broke the mobile layout.

The summary labels the cause "confirmed" after the fix restores mobile conversions. Ledgerline is fictional and the details are illustrative.

12How do you make monthly reporting repeatable?

Save the prompts from Steps 1 to 4 in a project, along with your thresholds, conversion definitions and a note on known tracking changes. Each month, upload the new exports and ask Claude to run the same analysis. Consistency matters more than sophistication: a simple report run the same way every month is more useful than a clever one that changes each time.

On paid plans, you can also set up a scheduled task that reads exports saved to a connected folder and drafts the report for you to review. Keep the review step; it's where you add the context Claude can't know.

13What should you try before the next lesson?

Export last month's campaign report and run the inspection prompt. Even if you don't continue, you'll learn whether your exports are clean enough to trust. Then ask one business question and one follow-up.

Next: building marketing tools with artifacts. Or return to the Claude for Marketers track.

14How do you compare channels fairly?

Channel comparisons are where marketing analysis most often goes wrong, with or without AI. Each platform claims credit for conversions in its own way, so adding up conversions from Google Ads, Meta and GA4 usually gives a total larger than your real number. Tell Claude which source you treat as the source of truth, often GA4 or your CRM, and ask it to use platform figures only for within-platform comparisons.

It also helps to agree on one efficiency measure for the whole team, such as cost per qualified lead from the CRM, and ask Claude to calculate it the same way every month. When channels are compared on different measures, every channel manager can make their own channel look good.

Finally, ask Claude to show volume next to efficiency. A channel with a low cost per lead but very few leads may not be able to absorb more budget. A simple scatter chart of spend against cost per conversion by campaign often makes these trade-offs obvious in a way a table doesn't.

15How do you share the analysis safely?

Charts and summaries are easy to share; raw exports less so. Before you share a chat or a file, check that it doesn't include anything you wouldn't send by email, such as client names in an agency account or revenue figures meant only for leadership. On Team and Enterprise plans, keeping recurring analysis in a project with the right members is the simplest way to control who sees it.

If you present the findings, show the question, the data range and the threshold you used on the first slide. People trust analysis more when they can see its boundaries, and it prevents the familiar problem of a chart being reused months later without its context.

16What GA4 quirks trip up analysis?

Several GA4 behaviours produce numbers that look wrong but aren't, and Claude can't know about them unless you tell it or it spots the pattern. Add a line about each to your analysis prompt.

  • Users don't add up. A user who visits from two channels counts once in each channel row but once in the total. Summing user columns across rows overstates the total. Sessions, events and conversions are safer to sum, but say which you're using.
  • Thresholding. Google says GA4 may withhold data in reports and explorations to prevent anyone identifying individual users, particularly with demographics or Google signals, and that a narrow date range makes it more likely (Google Analytics Help). Small rows disappearing from an export may be thresholding, not a real drop.
  • "(not set)" and "(other)" rows. These are real rows with real traffic. Ask Claude to report them rather than drop them, and to note if they grow.
  • Attribution settings. Conversions credited to channels depend on the property's attribution model. If someone changed it, month-on-month comparisons break. Note the model in your prompt.
  • Explorations versus standard reports. The same metric can differ slightly between them. Export from the same place each month.

A useful line for your prompt: "Before analysing, check whether totals in the file equal the sum of rows for each metric, and tell me which metrics don't add up and why that might be."

17Which analysis prompts are worth reusing?

Anomaly scan:

Attached: daily sessions and conversions by channel for the
last 90 days. Flag any day or week where a channel moved more
than its normal range. For each, show the numbers, how unusual
it is compared with the previous 8 weeks, and possible causes
I should check (tracking change, campaign launch, holiday,
outage). Don't explain causes as fact.

Paid search query mining (search terms export):

Attached: our Google Ads search terms report for 30 days.
1. Group terms into themes.
2. For each theme, total cost and conversions.
3. List themes spending money without conversions, with the
   specific terms, as negative keyword candidates.
4. List converting terms not already exact keywords.
Show the code you ran so I can check the grouping.

Cross-platform spend table:

Attached: exports from Google Ads, Meta and LinkedIn. Column
names differ. Map them to: date, platform, campaign, spend,
impressions, clicks, conversions. Show me the mapping before
combining, then build one table and a summary by platform.
Note that each platform counts conversions its own way.

The "show me the mapping first" step is the main safeguard in multi-source work. Platforms name similar metrics differently, and a wrong mapping silently ruins every number after it.

18How do you check Claude's numbers?

Pick two or three figures from every analysis and check them yourself against the platform: the overall total, the biggest change and one number that will go in a slide. If they match, the rest is probably right. If one doesn't, ask Claude to show how it calculated that figure step by step. Code execution makes this easy, because the calculation is in code you can read rather than in prose.

For anything that goes to leadership, keep the file, the prompt and the code together, so someone can rerun the analysis next month and get the same answer.

19Common questions

Can Claude analyse GA4 data? Yes. Export a report as CSV and upload it. With code execution on, Claude calculates from the file, builds tables and charts, and explains changes.

Is code execution available on the free plan? Yes. Anthropic says code execution and file creation are available on all plans, including Free, on the web, desktop and mobile apps.

Can I trust Claude's explanations of my data? Trust the calculations more than the explanations. Treat causes as hypotheses, add context Claude can't know, and ask for alternative explanations.

Questions people ask

3 answers

Can Claude analyse GA4 data?

Yes. Export a report as CSV and upload it. With code execution on, Claude calculates from the file, builds tables and charts, and explains changes.

Is code execution available on the free plan?

Yes. Anthropic says code execution and file creation are available on all plans, including Free, on the web, desktop and mobile apps.

Can I trust Claude's explanations of my data?

Trust the calculations more than the explanations. Treat causes as hypotheses, add context Claude can't know, and ask for alternative explanations.

Sources

  1. Anthropic Help Center, Create and edit files with Claudesupport.claude.com
  2. Anthropic Help Center, Upload files to Claudesupport.claude.com
  3. Claude Platform docs, Prompting best practicesplatform.claude.com
  4. Anthropic, Build live dashboards and animate explainers with Claudeclaude.com
Written and reviewed by Dipuck JonesHow we research and testReport an error

Keep learning

All Claude →