Set Up GTM Tracking with Meta and Google Analytics
Learn how to set up Google Tag Manager tracking with Meta and Google Analytics using a step-by-step guide. Perfect for resale businesses looking to optimize their tracking tools.
Before you begin, you’ll need a few accounts ready to go:
-
Access to your domain provider (for DNS updates)
If you don’t have one of these set up yet, go ahead and create the necessary accounts. We also recommend connecting a Meta Pixel to your Meta Ad Account before starting.
Step 1: Create Web and Server Containers in Google Tag Manager
-
Log into Google Tag Manager and create a new Web Container. Give it a name related to your website (e.g. yourdomain.com - Web).
-
Follow the installation instructions to add this Web Container to your site.
-
Next, in the Admin section, create a Server Container. Name it similarly, but note that it’s your Server container.
-
Choose Manually provision tagging server and copy the configuration snippet that appears. Save it somewhere—you’ll need it shortly.
Step 2: Set Up Your Server Container in Stape.io
-
Create a free Stape.io account.
-
In your dashboard, click Create Container under "Recent sGTM containers."
-
Name the container to reflect that it’s a Server Container.
-
Paste the configuration code you copied from GTM.
-
Select a server location near you (e.g. Germany or Finland).
-
Add a custom domain like
https://gtm.yourdomain.com/
(replaceyourdomain.com
with your actual domain).
Tip: Disable “Automatic Upgrade” on your Stape account for now to avoid unexpected plan changes.
Step 3: Connect Your Custom Domain
-
Go to your domain provider’s DNS settings.
-
Add a CNAME record that points your new custom domain (
gtm.yourdomain.com
) to the domain provided by Stape.-
TTL: Set to 600 or 3600.
-
-
Wait for the domain to verify in Stape.
-
Once verified, go back to your Server Container in GTM:
-
Go to Admin > Container Settings
-
Click Add URL and enter your custom domain.
-
Step 4: Integrate with Meta Business Suite
-
In Meta Business Suite, go to All Tools > Events Manager.
-
Choose Partner Integrations from the sidebar.
-
Select Google Tag Manager, then click Connect Account.
-
Choose your Meta Pixel, then select Configure with Google.
-
Connect both your GTM Web and Server containers.
-
When asked, enter your custom domain again for the server container.
Step 5: Add Google Analytics (GA4) Integration
-
In Google Analytics, go to Admin > Data Streams.
-
Select your web stream and copy the Measurement ID.
-
Go back to the Meta configuration tab and paste the Measurement ID.
-
Press Publish to confirm.
Step 6: Set Up Consent Settings in GTM
-
Open your GTM Web Container.
-
Go to the Tags section and click into each tag.
-
Under Consent Settings, look for Built-in Consent Checks.
-
Make sure the following four settings are selected for each tag:
-
ad_storage
-
ad_personalization
-
ad_user_data
-
analytics_storage
-
-
If they’re missing, enable them manually by selecting “Require additional consent for tag to fire” and adding each item above.
That’s It!
Once these steps are complete, your GTM tracking setup should be good to go. If you’re not seeing data in Google Analytics, or if something doesn’t look right, you’re welcome to reach out. While we didn’t build this integration ourselves, we’re happy to point you in the right direction.
You can also reach the original guide creator at oden@socmancon.com for direct support.