Introduction
With stricter privacy laws and browser limitations, traditional client-side tracking is losing accuracy. Thatβs where Google Ads Server-Side Tracking with Google Tag Manager (SGTM) comes in. By using Stape.io with a custom domain, you can improve data accuracy, bypass ad blockers, and fully comply with privacy-first tracking.
In this guide, youβll learn step by step how to implement Google Ads first party tracking and GA4 server-side tracking with GTM and Stape.io.
PrerequisitesΒ
Before starting, make sure you have:
- Google Tag Manager account (Web + Server containers)
- A Stape.io account
- Access to DNS provider (Cloudflare, GoDaddy, etc.)
- Google Ads account (with conversions set up)
- GA4 property (Measurement ID ready)
π Need Help?
Β Hire Me for Setup:Β WhatsApp Me
Β Book a Consultation:Β Schedule a Call
Step 1: Create Stape.io Account & Server Container
A. Prep in GTM
- Create a new Server Container in Google Tag Manager.
- Choose βManually provision tagging server.β
- Copy the Container Configuration Key.
B. Create Stape Account
- Go to Stape.io/sign-up.
- Choose your location (Global or EU).
- Sign up with Email or Google.
C. Set up Server Container
- Log in β Click βCreate sGTM Container.β
- Paste the GTM Configuration Key.
- Select your Server Location.
- Choose the Free plan.
- Wait until status shows Running.
D. Custom Domain
- In Stape β Go to Domains β Add custom domain (e.g., tags.yourdomain.com).
- Copy the DNS Records from Stape.
- Add them in your DNS provider (Cloudflare/GoDaddy).
- Disable proxying (set to DNS only).
- Paste this custom domain in GTM Server Container β Settings β Server URL.
Step 2: Create GTM (Web & Server) Properties
A. Create GTM Account
- Go to tagmanager.google.com.
- Click Create Account.
- Enter Account Name.
πΈ Screenshot: GTM account or web container creation page
B. Create Web Container
- Enter Container Name (e.g., yourdomain-Web).
- Select Target Platform: Web.
- Copy the two GTM snippets (Web ID: GTM-XXXXXXX).
C. Create Server Container
- Go to Admin β Create Container.
- Name it (e.g., yourdomain-Server).
- Select Target Platform: Server.
- Choose Manually provision tagging server.
- Copy the Container Configuration Key.
Step 3: Add GTM Script to Website
- Snippet 1 (Head): Place immediately after <head>.
- Snippet 2 (Body): Place immediately after <body>.
Step 4: Link Stape with SGTM
- Log in to Stape.io β Create SGTM container β Paste GTM Key.
- Add a custom domain in Stape (e.g., tags.yourdomain.com).
- Add DNS records in your DNS provider β Verify.
- In GTM Server Container β Add this custom domain as Server URL.
Step 5: Add Custom Subdomain & Custom GTM Loader
Part 1: Subdomain Setup
- In Stape β Add custom domain (tags.yourdomain.com).
- Add CNAME/A records in DNS.
- Verify β Update in GTM Server Container settings.
Part 2: GTM Loader Setup (Adblock Bypass)
- In Stape β Go to Power-Ups β Custom Loader.
- Enter your custom domain + Web GTM ID.
- Generate script β Replace old GTM script on website.
- Test with GTM Preview Mode (confirm scripts load from custom domain).
Step 6: Add Form Listener in Web GTM
- Create Custom HTML Tag β Add JS snippet that pushes formSubmission event.
- Create Custom Event Trigger β Event Name: formSubmission.
- Test with GTM Preview β Confirm event fires β Publish container.
Step 7: Send Data from Web GTM β Server GTM
- Edit GA4 Config Tag β Add parameter:Β server_container_url β https://tags.yourdomain.com
- Create GA4 Event Tag β Event Name: form_submit.
- Trigger: formSubmission event.
- Preview both containers β Verify pageview + form_submit requests.
Step 8: Configure SGTM β Send Data to Google Ads
A. Server Variables
- ed_value: Event Data β value
- ed_currency: Event Data β currency
- cnst_GAds_ID: Constant β Your AW-ID
B. Conversion Trigger
- Type: Custom Event
- Condition: event_name = form_submit
C. Server Tags
- Google Ads Conversion Linker β Trigger: All GA4 requests
- Google Ads Conversion Tracking β Trigger: Conversion event
- Conversion ID + Label
- Value: {{ed_value}}
Step 9: Test & Debug
- Preparation β Start Web + Server GTM Preview.
- Check Network Tab β Confirm scripts load from custom domain.
- Submit Test Conversion β Verify GA4 Event fires in Web GTM.
- Server GTM β Confirm GA4 Client receives request.
- Google Ads Tags β Check Conversion Linker + Conversion Tracking fire.
- Outgoing Request β Verify correct Conversion ID + Label.
- Publish both containers β
Frequently Asked Questions
Q1. Why use server-side tracking?
π More accurate, bypasses ad blockers, and complies with privacy laws.
Q2. Do I still need the Conversion Linker?
π Yes, itβs mandatory for GCLID tracking.
Q3. Can Enhanced Conversions work with SGTM?
π Yes, using hashed user data (email, phone).
Q4. How do I test if itβs working?
π Use GTM Preview + Tag Assistant β Confirm conversions in Google Ads (may take up to 24h).
Q5. Is Stape required?
π No, you can self-host SGTM, but Stape makes it easier.
Conclusion
By following these steps, youβve successfully implemented Google Ads Server-Side Tracking with GTM and Stape.io.
β Benefits:
- Accurate data collection
- Reliable Google Ads conversions
- Enhanced Conversions support
- Privacy-compliant tracking
Now you can confidently optimize campaigns knowing every lead and conversion is tracked correctly using Google Ads first party tracking.
Want expert help setting up Google Ads server side tracking with GTM & Stape?
π Book a Free Consultation Call or message me on WhatsApp today!
Β Hire Me for Setup:Β WhatsApp Me
Β Book a Consultation:Β Schedule a Call