How to Create an Expense Report in Google Analytics with AI
Tracking your marketing expenses is the only way to know if your campaigns are actually working. Without connecting your ad spend to your results, you're flying blind, unable to calculate crucial metrics like Return on Ad Spend (ROAS) or Customer Acquisition Cost (CAC). This article will guide you through creating a detailed expense report in Google Analytics, starting with the traditional manual method and ending with a much simpler AI-powered approach.
Why An Expense Report in Google Analytics is a Game-Changer
Google Analytics is fantastic at telling you what happens on your website - which pages people visit, how long they stay, and which traffic sources bring them in. But by default, it doesn't know how much you're spending on channels like Facebook Ads, LinkedIn Ads, or other non-Google platforms. Your spend data lives in one place, and your performance data lives in another.
An expense report bridges that gap. By importing your cost data into Google Analytics, you can see your ad spend directly alongside your website analytics. This unified view allows you to:
Calculate ROAS accurately: Instead of manually dividing revenue from GA by spend from Facebook Ads Manager, you can see ROAS calculated for you, right inside your GA reports.
Make smarter budget decisions: Immediately spot which campaigns are draining your budget with little return and which ones are driving profitable growth. This clarity helps you reallocate spend from underperformers to your top channels.
Understand the full customer journey: See the cost associated with each touchpoint and understand the true cost to acquire a visitor, lead, or customer from any given channel.
The Traditional Method: Using Cost Data Import in GA4
Google Analytics 4 has a built-in feature called "Cost Data Import" that lets you manually upload a CSV file containing your spending information from external sources. While effective, this process is entirely manual and can be time-consuming, especially if you run ads on multiple platforms.
Here’s how to do it step-by-step.
Step 1: Get Your Expense Data
First, you need to collect your cost data from any non-Google advertising platform you use. Log into each platform (e.g., Facebook Ads Manager, LinkedIn Campaign Manager, TikTok Ads) and export a report that includes at least the following information, broken down by day:
Campaign Name
Source
Medium
Date
Cost (Spend)
Clicks
Impressions
Step 2: Prepare Your CSV File for Upload
Once you have your data, you need to format it into a specific CSV file structure that Google Analytics can understand. Open a new spreadsheet in Google Sheets or Excel and create columns with these exact headers:
date | source | medium | campaign | cost | clicks | impressions |
(YYYYMMDD) | (e.g., facebook) | (cpc, etc.) | (campaign name) | (number) | (number) | (number) |
Important: The source, medium, and campaign values in your CSV file must match the UTM parameters you're using in your ad URLs. For example, if your tracked URL is https://yourwebsite.com?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale, your spreadsheet row should list 'facebook', 'cpc', and 'spring_sale' respectively. The date format must be YYYYMMDD.
Here’s an example of what your final CSV file might look like:
date,source,medium,campaign,cost,clicks,impressions20231026,facebook,cpc,fall_promo_2023,150.75,301,845020231026,linkedin,cpc,ebook_download_q4,95.50,110,650020231027,facebook,cpc,fall_promo_2023,155.20,315,880020231027,linkedin,cpc,ebook_download_q4,102.00,121,7100
Save this file as a CSV.
Step 3: Create a New Data Source in GA4
Now, it's time to tell Google Analytics to expect your data.
Log in to your Google Analytics 4 property.
Go to Admin (the gear icon in the bottom left).
In the "Property" column, click on Data Import.
Click the blue Create data source button.
Give your data source a name, like "Facebook Ad Costs."
Under "Data type," select Cost data.
Click on Upload file and proceed. GA4 will provide an example schema — ensure yours matches.
Step 4: Upload Your CSV File
In the Data Import screen, find the data source you just created and click Upload file. Select your CSV file and Google will start processing it. This may take some time depending on the file size. You'll see the status change from "Pending" to "Completed" once it's done.
Step 5: View Your Expense Report in GA4
After a successful upload (it can take up to 24 hours for the data to be fully processed), you can find your cost data in the standard acquisition reports.
Navigate to Reports > Acquisition > Traffic acquisition.
The default report table won't show cost data. Click the pencil icon (Customize report) in the top-right corner.
Under "Report Data," select Metrics.
Click Add metric, search for and add "Cost" and "Cost per conversion." You can also rearrange the metrics here. Click Apply.
Save the changes to the current report or save it as a new report.
You can now see your ad spend from external sources alongside GA4's native session and conversion data, giving you a powerful, unified view of your marketing performance.
The Downside: This method is powerful but requires discipline. You have to repeat this entire process — downloading data, formatting the CSV, and uploading to GA4 — every single time you want to refresh your reports. For daily or even weekly reporting, that adds up to a lot of tedious, manual work.
A Smarter, Faster Way: Using AI to Build Your Expense Reports
The manual process is tedious and slow, creating a frustrating delay between when something happens in your campaigns and when you can actually report on it. This is where AI-powered analytics tools come in. Instead of wrestling with CSV files and report builders, you can simply connect your data sources once and ask questions in plain English.
Imagine this workflow instead:
Connect your accounts: You connect your Google Analytics, Facebook Ads, Shopify, and other marketing platforms with a few clicks. No APIs or complex setup needed. The AI tool automatically syncs and unifies the data in the background.
Ask your question: Instead of building a report, you just ask what you want to know using a simple phrase.
For example, you could ask:
"Show me my total ad spend versus revenue for the last 30 days, broken down by campaign."
"Which Facebook campaign had the best ROAS last week?"
"Create a line chart comparing my ad spend from Google and Facebook this month."
The AI understands your request, pulls the live data from all your connected sources, and instantly generates the dashboard or chart you asked for. What previously took an hour of manual exporting and data manipulation now takes 30 seconds.
This approach transforms reporting from a chore into a conversation. You no longer need to be a data expert or learn the intricacies of Looker Studio to get answers. If you have a follow-up question, you just ask it. For example, after seeing your campaigns a new question might pop up: "Why did traffic from the 'fall_promo_2023' campaign drop on Tuesday?". The AI can then look for anomalies and give you potential reasons.
This method frees you from the drudgery of manual reporting. You get access to live, real-time data so you're always making decisions based on what’s happening now, not last week. It democratizes data, allowing anyone on your marketing or sales team to get answers and contribute to strategy without needing to be a spreadsheet expert.
Final Thoughts
Creating an expense report in Google Analytics is essential for understanding your marketing ROI. While the native Cost Data Import feature works, it’s a manual process that consumes valuable time you could be spending on strategy and optimization. By contrast, leveraging AI-powered tools removes this friction almost entirely.
Here at Graphed, we created a way for marketers to get instant answers without the busywork. We integrate directly with Google Analytics, Facebook Ads, Shopify, Salesforce, and all your other key platforms. Once connected, you can use simple, natural language to ask questions and have real-time dashboards and reports built for you in seconds. No more CSV downloads or manual report building - just direct access to the insights you need to grow your business.