Let's imagine you have a website connected to a Google Analytics 4 [GA4] account, and you run Facebook ad campaigns. People are clicking on your ads, visiting your website, and purchasing… or leaving. But how can you get more information about visitors, their Facebook ads and website activities? A common way is to gather data on social traffic and customer behavior in your Facebook ads account and Google Analytics 4.
Here are some reasons why you might be asking yourself about analytics right now:
This is why Google Analytics 4 is the most popular platform for tracking Facebook advertising campaigns in 2024. In the future of this article, we'll tell you about a way to integrate these two systems into one digital analytics instrument.
Tracking Facebook ads in Google Analytics 4 is a good idea if statistics from different sources aren't aligned — for example, if you've found problematic data in Ads Manager and Google Analytics 4 that doesn't match.
Discrepancies between data in Ads Manager and Google Analytics 4 stem from different tracking approaches and other technical factors. Smartly combining data and insights from all analytical instruments is the only way to get data on what users do both before and after clicking on ads.
In addition, tracking Facebook advertising campaigns in Google Analytics 4 is crucial for investigating total marketing expenses and calculating return on ad spend (ROAS). You might suppose that you can improve your performance with social media advertising, but have no data to rely on in your estimates.
If you want to analyze reach, views, clicks, separate promotion cost, and events cost, then tools like Facebook Ads and Facebook Pixel will be enough. However, the Facebook → Google Analytics link will significantly expand your analysis options: views, clicks, ad costs, conversions, customer behavior tracking, comparative analysis with other marketing channels, audience insights, geo, device, landing page reports, etc.
To start tracking campaigns on Facebook in Google Analytics 4, you have to ensure that your website has a GA4 or GTM tracking code on each page you want to track. Also, you need to have administrator permissions to access your site and conduct all required Google Analytics 4 activities.
Keep in mind that with GA4, you'll be able to easily track only your campaigns, pages, and personal account activities in tight connection with your website. For instance, you won't be able to say for sure what people do before clicking the link to your site. But you can add a Facebook Pixel to easily track the cost of events on the Facebook side.
In addition, you can set goals and conversions in GA4. Keep in mind that both of these systems must have the same settings for importing data and uniting it in one database.
Also, you need to prepare an advertising campaign on Facebook and set it up especially for GA4:
UTM tags are the key to working with different types of campaigns on a platform or Facebook. If you create your UTM tags correctly, the data will be marked properly, and you'll get the reports you want.
Use a spreadsheet (Google Sheets, Excel, LibreOffice Calc, etc.) to start. Place all the URLs you need in one column and ensure that they lead to your site pages with Google Analytics 4 installed. You can also include things other than URLs that you need to track for the advertising campaign.
Add a Visit the Website button or the URLs of your main webpage to the informational block of your business page. All of these URLs will serve as entrance points from Facebook to your website, where Google Analytics 4 will collect traffic data.
Here's an example of a table you should create:
What are UTM tags? You see these in the long tail of URL text when clicking on ads and proceeding to another page. So what kind of marketing information can be included in URLs with UTM tags?
Source: Identifies the traffic source, such as a website, social media traffic, or advertising system.
Example: utm_source=facebook
Medium: Identifies the type of marketing medium, such as email or cpc.
Example: utm_medium=cpc
Campaign: Identifies the specific advertising campaign.
Example: utm_campaign=kids_toys
UTM ID: A unique identifier for a campaign (Campaign ID) that is required for GA4 data import.
Example:utm_id=facebook_123abc
Important! If you are planning to import non-Google advertising cost data to Google Analytics 4, you need to add the utm_id (campaign identifier) parameter to the links in your ads.
There are also optional UTM parameters that can be added to links as desired:
Term: Identifies keywords for paid keyword campaigns.
Example:utm_term=running+shoes
Content: Differentiates between links or ads that point to the same URL from the same source, medium, and campaign.
Example:utm_content=banner
That's enough to track even the most complicated Facebook campaigns:
Once you've determined your source, medium, and campaign, it's time to add the UTM tags to your campaign links. You can do this manually by adding the parameters to the end of your URLs, or you can use a UTM builder tool to create the URLs for you.
We recommend using UTM builder by Google or this handy UTM Builder, which we use for ourselves & created keeping all the tiny nuances of GA4 in mind.
To create UTM tags with UTM Builder:
There are two ways to add generated links to your own campaigns or ads.
1. The most common option is to copy and paste the entire above URL into the website URL field.
After you add UTM tags to your links, you can analyze traffic from Facebook visitors in the following Google Analytics 4 reports:
This report summarizes all your traffic data, which consists of two parts: user acquisition and traffic acquisition. By clicking on the corresponding link, you can open each report separately.
This report contains data about users who first visited your site. By default, it shows data broken down by channel groups, but you can change the settings to First user source/medium First user campaign to see more detailed statistics.
The traffic acquisition report will help you understand what brings users to navigate your website (sessions) based on whether they're new or returning users. This is different from the User acquisition report, which focuses on how users discovered your business or website for the first time only.
For deeper analysis of your Facebook ad campaigns, you can create custom reports in the Explorations section with any metrics you need.
But without further integration of revenue and cost data, you won't see much regarding the value of your ads results, as you won't be able to see profitability. So let's go a little further to calculate ROAS with the help of cost data importing.
After you have set up cost data importing correctly, a Non-Google cost report with the imported data will appear in the Acquisition section of your Google Analytics 4 report. Data will continue to appear in the report almost immediately after the file has been successfully processed and imported by the system. And you can compare the performance of your track Facebook ads in Google Analytics 4 with other channels!
There are three ways to import cost data from Facebook ads into GA4:
With this method, you have to put data from Facebook ads into a CSV file and upload it manually to Google Analytics 4 every time you need a report. If you have just two or three Facebook ad accounts, and you want to get a report every month, this manual method should work for you. But when it comes to having 10 ad accounts or having more advertising on other traffic channels, or if you want to get a report weekly or daily, it gets complicated and time-consuming.
This method can be called semi-automatic. Yes, Google Analytics 4 will automatically retrieve data from your SFTP server at the frequency you specify. However, you will still have to prepare a CSV file with Facebook ad cost and revenue data for uploading, periodically update it, and upload it to the SFTP server yourself, either manually or using an ETL/ELT tool such as OWOX BI Pipeline
There are a few reasons why managing a self-service SFTP server for importing Facebook ad cost data to GA4 may not be your best option:
Read more about how to import cost data from Facebook ads into GA4 using the SFTP method in our article.
Both of the methods above require you to regularly prepare a CSV file yourself for uploading. This activity can be tedious and time-consuming, as you need to:
A few more points on data preparation when creating a CSV file:
The good news is that with OWOX BI, you don't have to do it all. OWOX BI automatically prepares CSV files on a daily basis, and the OWOX team sets up your SFTP server and manages it with the highest level of security and performance.
With OWOX BI, you don't need to set up and manage the SFTP server yourself. We'll set up automatic importing and manage the whole process for you, with the highest level of security and performance.
Unique Advantages of OWOX BI:
After you set up UTM tags and cost importing, you may notice that the number of conversions in Facebook Ads Manager and Google Analytics 4 is different. This is because these services count conversions differently. You can learn more about the reasons in this article.
Therefore, in order to track Facebook ad conversions in Google Analytics 4, we recommend creating conversions in GA4 that reflect your own Facebook ad performance goals.
In order to create a conversion in GA4, you need to initially send an event to the GA4 platform. Subsequently, you can mark the event as a conversion within the interface of the system.
You can learn how to create goals and conversions in GA4 in this guide to Google Analytics 4 conversion tracking and this video on how to configure GA4 goals and conversions.
We hope this article and video has helped you to clarify your needs and understand the possibilities of modern analytics. Good luck!
There are three ways to import cost data from Facebook into GA4:
- Manually import CSV files via the GA4 interface
- Import cost data via the GA4 SFTP method
- Use the out-of-the-box solution from OWOX
You can analyze Facebook advertising in Google Analytics 4 reports and compare its effectiveness with other advertising channels.
By utilizing UTM codes in your Facebook ads campaigns, you can effectively track and measure the success of your campaigns in terms of traffic, conversions, and other key metrics.