Starting in 2027, Google ad tags running inside your server-side GTM container will receive the full, un-truncated visitor IP address by default. Not the last-octet-zeroed version most of us have been passing around for years. The raw client IP, handed straight to Google Ads, Floodlight, and (depending on your config) GA4.
If you run a tagging server, that single change rewrites a chunk of your consent logic, your DPA language, and the way you reason about PII leaving your infrastructure. Most SGTM guides still open with “IPs are automatically anonymised” or “Google doesn’t log the full IP” — that advice ages badly the moment the default flips. This post is the audit and remediation plan I’d want in front of me right now, written from the perspective of someone who has already rebuilt three client containers around it.
What’s Actually Changing in 2027
Today, when a Google tag fires from inside a server container, the behaviour is roughly this:
- The HTTP request from the browser hits your tagging server (e.g.
sgtm.yourdomain.com). - The server extracts the client IP from the incoming request headers.
- When you fire a Google Ads conversion, Floodlight, or GA4 tag, the SGTM client/tag passes an IP to Google — but Google’s ingestion pipeline truncates it (IPv4 last octet zeroed, IPv6 /64 masked) before anything downstream sees it.
- You, the implementer, generally never had to think about IP forwarding because the truncation was automatic at Google’s end.
Starting in 2027, Google has signalled that its ad tags inside SGTM will begin receiving the full IP, not the truncated one. The truncation step moves from being a Google-side guarantee to being an implementer-side responsibility. If you want IP minimisation, you now have to configure it.
That’s a quiet but significant inversion of defaults. The security model shifts from “opt-in to sharing more” to “opt-in to sharing less.” For EU and UK operators, that matters because your legal basis documentation almost certainly assumed the old behaviour.
Three concrete consequences:
- Google Ads enhanced conversions will have access to full IPs for match-rate improvements, whether or not you want that signal included.
- Floodlight will be able to use IP for frequency capping and attribution with more fidelity.
- GA4 server-side tags — if you fire them through SGTM with the default IP override behaviour — will forward full IPs to Google’s collection endpoint, which has its own regional handling but no longer benefits from pre-Google truncation.
The right time to audit was last quarter. The second-best time is now.
Auditing Every Tag in Your Server Container
Before you touch any config, you need a definitive list of what’s in your container and what each tag does with IP data. Most containers I inherit have between 20 and 60 tags, and nobody on the current team built half of them.
Here’s the audit process I run:
Step 1: Export the container
From the GTM UI: Admin → Export Container → select your SGTM workspace. You get a JSON file. Everything you need is in there.
Step 2: Grep for IP handling
Run this quick script against the export to flag any tag that references IP fields:
#!/usr/bin/env bash
# audit-sgtm-ip.sh — flag tags touching IP fields
FILE="$1"
jq -r '
.containerVersion.tag[]
| select(
(.parameter // [])[]
| (.value // "")
| test("ip_override|client_ip|x-forwarded-for|remote_addr"; "i")
)
| "\(.name)\t\(.type)\t\(.tagId)"
' "$FILE"
Run it: ./audit-sgtm-ip.sh container.json
You’ll get a tab-separated list of every tag that explicitly references an IP field. For tags that don’t show up, you still need to check the client they fire through (the GA4 client, the Google tag client, custom clients) because those often set IP at the client level, not the tag level.
Step 3: Build an audit matrix
Create a spreadsheet with these columns for every tag:
| Column | What goes in it |
|---|---|
| Tag name | From the export |
| Vendor | Google Ads, Floodlight, GA4, Meta CAPI, TikTok, custom HTTP |
| Current IP behaviour | Forwards / truncates / strips / unknown |
| Post-2027 behaviour | Full IP / truncated / N/A |
| Consent dependency | Fires only with ad_storage granted? Yes/No |
| Legal basis | Consent / legitimate interest / contract |
| Action required | None / add IP strip / add consent gate / remove |
This matrix becomes the artefact you share with your DPO or legal counsel. It’s also what you refer back to in 2027 when something breaks and nobody remembers why.
Step 4: Check your clients, not just your tags
SGTM clients (Google Analytics: GA4 client, Google Tag client, custom clients) are where event_data.ip_override gets set. Look in each client’s code. If you’re running the standard Google-provided clients, the IP handling is baked in and will change automatically with the client version update. Pin your client versions if you want time to test before the default flips.
Configuring Google Ads, Floodlight, and GA4 Responsibly
Once your audit is done, you have decisions to make tag by tag. There is no single right answer — it depends on your legal basis, your market, and how much match-rate you’re willing to trade for minimisation.
Google Ads conversion tags
The honest case for passing full IP: higher enhanced conversions match rates, especially in mobile-heavy verticals where cookie signal is weakest. The case against: you’re handing identifiable data to an ad network with no meaningful user-level control on your end.
My default stance for EU/UK clients: strip or truncate the IP before the Google Ads tag fires, unless the client has a documented legitimate interest assessment that covers it. For US clients under CCPA, full IP is acceptable if your privacy policy discloses it and you honour opt-out signals.
To strip the IP, add a tag sequencing rule or a transformation in your SGTM container. Here’s a transformation that zeros the last octet of IPv4 before the Google Ads tag runs:
// SGTM Transformation: truncate_ip_v4
const getEventData = require('getEventData');
const setEventData = require('setEventData');
const ip = getEventData('ip_override');
if (ip && ip.indexOf('.') !== -1) {
const parts = ip.split('.');
if (parts.length === 4) {
parts[3] = '0';
setEventData('ip_override', parts.join('.'));
}
} else if (ip && ip.indexOf(':') !== -1) {
// IPv6: keep first 4 groups, zero the rest
const groups = ip.split(':');
const kept = groups.slice(0, 4);
while (kept.length < 8) kept.push('0');
setEventData('ip_override', kept.join(':'));
}
return true;
Apply this transformation to Google Ads, Floodlight, and any GA4 tag where you want IP minimisation preserved after the 2027 change.
Floodlight
Floodlight’s attribution model benefits more from IP than Google Ads conversions do, because it uses IP as a signal in cross-device matching. The trade-off is the same: better attribution, more exposure.
For Floodlight, I usually recommend a region-based rule. Full IP for US traffic, truncated IP for EU/UK traffic. You can implement this with a variable that checks the geo and sets a flag:
// Variable: should_strip_ip
const getEventData = require('getEventData');
const country = getEventData('x-ga-mp2-user_data.geo.country')
|| getEventData('user_data.country')
|| '';
const stripRegions = ['DE','FR','IT','ES','NL','BE','IE','PL','SE',
'DK','FI','AT','PT','GR','CZ','HU','RO','GB'];
return stripRegions.indexOf(country.toUpperCase()) !== -1;
Then gate your truncation transformation on that variable.
GA4
GA4 is the odd one out. Google’s documented position is that GA4 does not log IP addresses — it uses the IP transiently for geo-derivation and then drops it. That’s the documented behaviour, but it relies on trust in Google’s server-side handling. If your DPIA requires you to minimise before transmission (rather than trust downstream deletion), you’ll want to truncate IP on GA4 tags too.
A reasonable middle ground: let GA4 receive full IP for geo-derivation accuracy, but pre-derive country/region in your SGTM container and strip the IP yourself. The MaxMind GeoIP database via a custom template works well for this if you want to cut Google out of the geo-lookup entirely.
Consent Mode v2: What Happens When ad_storage Is Denied
This is where most implementations get sloppy. The assumption is: “If the user denies ad_storage, Google tags don’t fire, so IP forwarding isn’t a concern.” That’s wrong in two ways.
First, Consent Mode v2 doesn’t stop tags from firing. It changes what the tags send. When ad_storage=denied, Google ad tags still fire but send “cookieless pings” — stripped-down requests used for modelling. Those pings still contain the IP.
Second, SGTM runs server-side. The server receives the request with the full IP regardless of what the browser’s consent state is. Your SGTM container has to actively respect consent in how it forwards data; it won’t happen by accident.
Concrete pattern for respecting denied ad_storage at the server:
// SGTM Transformation: enforce_consent_ip_strip
const getEventData = require('getEventData');
const setEventData = require('setEventData');
const consent = getEventData('consent_state') || {};
const adStorage = consent.ad_storage;
const adUserData = consent.ad_user_data;
// If either ad_storage or ad_user_data is denied, strip IP entirely
if (adStorage === 'denied' || adUserData === 'denied') {
setEventData('ip_override', '0.0.0.0');
}
return true;
A few things to note about this pattern:
- Setting IP to
0.0.0.0is cleaner than deleting the field, because some Google tags re-derive IP from request headers if the override is missing. - You still need to check
ad_user_dataseparately fromad_storage— they’re independent signals under Consent Mode v2. - This runs before any Google tag transformation, so it short-circuits the full-IP default for denied users.
The gotcha: Consent Mode signals have to actually reach your server. If you’re relying on the GA4 client to parse them from the browser request, double-check that gcs and gcd parameters are populating consent_state correctly. Fire a test event with ad_storage=denied and inspect the SGTM preview — you want to see the consent state propagating, not defaulting to granted.
For deeper work on consent plumbing, this is the kind of thing we routinely untangle on our GTM service engagements.
GDPR, CCPA, and UK ICO Implications
Full IP addresses are personal data under GDPR and the UK GDPR. That’s been settled since the Breyer judgement in 2016. Once Google’s SGTM tags start receiving full IPs by default, your processing chain changes in a way that likely requires documentation updates.
What you’ll need to update
Data Processing Agreements. Your DPA with Google (through Google Ads, Google Analytics, Google Marketing Platform) already covers IP processing, but the character of that processing changes. If your DPA references “truncated IP addresses” or “IP addresses anonymised prior to transmission,” those clauses no longer describe reality. Request an updated DPA addendum from Google or add a side letter acknowledging the change.
Privacy policy. If your privacy policy currently says “we share truncated IP addresses with our advertising partners,” you’ll need to rewrite that section. The honest version is: “We share your IP address with Google Ads for conversion measurement and fraud prevention.” Users deserve to know what they’re agreeing to.
Record of Processing Activities (Article 30). Update the ROPA entry for your advertising measurement processing to reflect that IP is transmitted in full to Google ad products. If your lawful basis was previously “legitimate interest based on pseudonymised data,” you may need to redo the balancing test now that the data is more identifiable.
Data Protection Impact Assessment. For any high-risk processing — large-scale advertising measurement arguably qualifies — redo the DPIA. The ICO has been clear that changes in data minimisation posture are a trigger for DPIA review.
CCPA specifics
Under CCPA/CPRA, full IP is “personal information” and, when shared with Google Ads for cross-context behavioural advertising, counts as a “sale” or “share” that triggers opt-out rights. If you’re not already honouring Global Privacy Control signals at the SGTM layer, the 2027 change makes that gap more urgent.
ICO guidance
The UK ICO has been leaning harder into enforcement around ad tech. The practical effect: if you’re a UK operator and you can’t demonstrate that you’ve considered the 2027 change and made a conscious decision about IP forwarding, you’re in a weaker position if challenged. A one-page internal memo documenting your audit, your decisions, and your rationale is worth its weight in gold.
Pre-2027 Readiness Checklist
Here’s the checklist I work through with clients. Tick each item before the default changes.
1. Logging
- Enable detailed request logging on your SGTM infrastructure (Cloud Run, App Engine, or self-hosted) with IP masking at the log layer.
- Retention: 7–30 days maximum for raw request logs containing IPs. Anything longer needs a specific lawful basis.
- Make sure your logging doesn’t accidentally create a secondary IP store that outlives your ingestion pipeline. I’ve seen clients with 90-day log retention who forgot that was effectively an IP database.
2. IP hashing options
If you want to preserve a per-user signal without storing raw IPs, hash them server-side before forwarding anywhere. A keyed hash (HMAC-SHA256 with a rotating key) is the right pattern. Example:
const sha256 = require('sha256Sync');
const getEventData = require('getEventData');
const setEventData = require('setEventData');
const ip = getEventData('ip_override');
const salt = 'rotate-me-quarterly-2024-q4';
if (ip) {
const hashed = sha256(salt + ip, {outputEncoding: 'hex'});
setEventData('user_data.hashed_ip', hashed);
setEventData('ip_override', '0.0.0.0');
}
return true;
Rotate the salt quarterly to prevent long-term re-identification.
3. Geo-restriction rules
Build a variable-driven rule set that applies different IP handling per region. The code sample earlier covers EU/UK; extend it for jurisdictions where you have specific contractual or regulatory constraints (Switzerland, Brazil’s LGPD, Quebec’s Law 25).
4. Header stripping patterns
The incoming request to your SGTM server contains X-Forwarded-For, True-Client-IP, CF-Connecting-IP (if you’re behind Cloudflare), and others. By default, SGTM uses these to derive the client IP. If you want deeper control, strip or rewrite these at the load balancer before they reach SGTM. For GCP, that’s a Cloud Armor rule or a load balancer header transformation.
5. Test harness
Build a repeatable test that fires a set of representative events — Google Ads conversion, Floodlight activity, GA4 purchase, Meta CAPI purchase — with and without consent granted, from EU and non-EU IPs. Run it against your staging SGTM container. Save the outputs so you have a baseline to diff against after the 2027 change.
6. Vendor contact list
Have an updated contact for your Google account manager, your DPO or external counsel, and your SGTM hosting provider. When something breaks in 2027, you don’t want to be hunting for the right email thread.
Common Mistakes and Troubleshooting
Mistake: Assuming Consent Mode v2 stops IP transmission. It doesn’t. Cookieless pings still carry IP. Always add an explicit server-side strip when consent is denied.
Mistake: Stripping IP in the client, not the tag. If you modify ip_override in the GA4 client, every downstream tag sees the stripped version — including tags where you wanted full IP. Scope your transformations to specific tags using tag firing priorities and conditions.
Mistake: Forgetting IPv6. Half the truncation scripts I inherit only handle IPv4. On modern mobile networks, 60%+ of traffic is IPv6. Test both.
Mistake: Trusting X-Forwarded-For blindly. If your SGTM server is behind a CDN or load balancer, the first IP in X-Forwarded-For may be a proxy, not the client. Configure your trust proxies explicitly.
Troubleshooting: Google Ads conversions dropped after adding IP strip. Check your enhanced conversions configuration. If you were relying on IP as a match signal, you’ll need to compensate with hashed email or phone. Add a user_data block with hashed PII to recover match rate.
Troubleshooting: GA4 geo accuracy degraded. If you’re stripping IP before GA4, you lose Google’s geo
Share this article