How to connect Facebook to Google Analytics

If you are using Google Analytics alongside Facebook to track your website visitors’ journey, you can connect both platforms through TheOptimizer in only a few steps.

Step 1: On Account Wizard, select the Facebook ad accounts you want to connect to GA, then click on Next.

Step 2: Now you need to add your Google Analytics account. Simply select an account nickname and click on Save. You will be redirected to your Google account login page where you will have to grant access to TheOptimizer.

How to connect Google Analytics 4 with Facebook on TheOptimizer P1

Step 3: Enter your Google account credentials following the on-screen instructions, then click Allow to allow TheOptimizer to view your Google Analytics data. Once the authorization process is finished, you will be redirected back to the Account Wizard page with the newly added Google Analytics 4 account pre-selected. Click on Next to finalize the setup.

How to connect Google Analytics 4 with Facebook on TheOptimizer P2

Step 4: Now, you are ready to connect the two platforms. You will see this overview, and you need to click on Add Analytics View

How to connect Google Analytics 4 with Facebook on TheOptimizer P3
nnect Google Analytics 4 with Facebook on TheOptimizer P4

Step 5: After selecting the account & property, you need to specify which Google Analytics metrics you would like TheOptimizer to import (you can select up to 60 metrics & a few metrics are pre-selected) and specify which UTM parameters you are using to track the Facebook campaign ID, ad set ID, and ad ID. Then, click on Add to finalize the process.

💡NOTE: Make sure to update your Facebook campaigns so that they include this tracking code:

utm_campaign={{campaign.id}}&utm_source={{adset.id}}&utm_medium={{ad.id}}

When to use custom tracking?

If, for some reason, you do not have all the above mentioned utm parameters available, you can enable and use our custom tracking option.

With Custom Tracking, you are able to pass more than one traffic source macro on a single GA4 parameter, using a special format. For example, you can pass all Facebook macros on utm_content, shown in the screenshot below:

How to connect Google Analytics 4 with Facebook on TheOptimizer P5

Click on Add, then Finish to finalize the process. Now, TheOptimizer will be able to track & report data from your linked Facebook and GA accounts.

💡NOTE: Make sure to update your Facebook campaigns so that they include this tracking code:

utm_content={{campaign.id}}|{{adset.id}}|{{ad.id}}

Next step: Start automating your Facebook campaigns

Click here to learn more about Facebook automation and get access to automation rule examples.

Updated on January 17, 2024
Was this article helpful?

Related Articles