Insights

Import Cost Data to Google Analytics 4 With Launchpad

by Paul Cote on Jan 08, 2024

Google Analytics 4 (GA4) features a native integration with Google Ads, allowing users to analyze their campaign cost, click, and impression data in context to the corresponding results on their website or app. While this enables better analysis of campaigns and advertising cost spent with Google, there is an obvious gap if you're buying media from other channels (like Facebook).

Thankfully, GA4 also offers a cost data import feature. This feature is ideal for anyone that would like to make non-Google metrics such as cost, clicks, and impressions available in GA4. Currently the GA4 cost import feature offers the following options:

  1. Upload a CSV file manually
  2. Upload automatically through SFTP and Launchpad

Keep reading to learn when each of these options is most appropriate, and how to set them up.

Upload a CSV File Manually

The manual CSV upload is a good solution if you're only working with a handful of websites and don't need the data to be uploaded more than once per month. You will need to export your data from the advertising platform and include the following fields:

  • campaign_id
  • campaign_name
  • date
  • cost
  • clicks
  • impressions

Once you have exported the campaign data, you will need to add two columns: source and medium. The source column should include the string you are using in your utm_source parameter (e.g., "facebook"), and the medium column should contain the string you are using in the utm_medium parameter (e.g., "cpc") for each of your campaigns.

Save the file as .csv and navigate to the Cost Import section in GA4. Here you will need to create a new cost import and map the schema to the corresponding columns in your file.

Import Automatically Through SFTP and Launchpad

The SFTP import option in Launchpad is ideal for importing data into many accounts or having your cost data imported daily. Follow these steps to configure your cost import with Launchpad:

  1. Sign in to launchpad and connect to your non-Google advertising sources.
  2. Create an SFTP destination and connect to your SFTP server.
    1. How to create an SFTP-enabled server
  3. Configure your job/s to query your data from the API, transform it to match GA4's schema requirements, and deliver the file to your SFTP on your preferred schedule.
    1. Use a lookup table to map your utm_source and utm_medium values to your campaign IDs.
    2. Use a function to add the lookup values to your CSV file.


      After you have delivered the files to your server, you can log in to GA4 and configure your cost import jobs.


      Typically you will have a job for each source, and you will need to work with your IT team to authenticate your server with GA4. Once you have authenticated your server, you can map the GA4 import job schema to the corresponding headings in your CSV exports.


      You will also need to configure a schedule in the GA4 import job. Your schedule can be daily, weekly, or monthly, and you can set your desired day and time. Be sure to set your schedule in GA4 to run after your job has run in Launchpad and the new file is available..

Need Help?

Calibrate Analytics provides both the technology and support to help you successfully import your cost data to Google Analytics 4. Connect with us today for a demo of our automated cost import solution for GA4.

Schedule a Free Demo

Share this post: