The challenge: clicks are not leads
Insurance is a high-stakes environment. The data is sensitive. The customer journey is long and spans several channels. A visitor clicks an ad, compares offers, leaves, comes back, and sometimes ends up in a conversation with an advisor from the sales network.
The marketing team ran SEA and Meta campaigns. The web analytics showed clicks and form views. The CRM held the real outcome: qualified leads, and sales. The two worlds did not talk to each other. The business question was simple: which campaigns bring qualified leads, not just traffic?
Answering it meant solving three things at once: attribution across the web and the CRM, e-commerce tracking for online offers, and a consent setup strict enough for the health insurance sector.
The enterprise measurement architecture
Everything is orchestrated through Google Tag Manager. One container, one documented data layer, and a naming convention shared by marketing, IT and the sales network. Application code pushes events to thedataLayer. GTM only reads them and routes them to GA4 and the ad platforms. No tag depends on a CSS selector.
Consent first: OneTrust wired into GTM
In health insurance, a tag that fires before consent is not a small bug. It is a compliance incident. OneTrust was therefore wired into the container as the single source of truth for consent.
- Default state is denied: the Consent Mode defaults are set before any other tag runs, in the consent initialization phase.
- Categories map to consent signals: each OneTrust category updates the matching signal:
analytics_storage,ad_storage,ad_user_dataandad_personalization. - Every tag has a consent requirement: analytics and advertising tags cannot fire without an explicit opt-in. Nothing is left to the default behavior.
- Testable: the setup was checked in GTM preview and in the browser network tab, so "no tag before consent" is verified, not assumed.
A lead event with no personal data
When a form is submitted, the site waits for the answer of the Dynamics 365 integration. Only a confirmed lead pushes an event. The payload carries what marketing needs to optimize: the form, the product, a scoring band, and the campaign source. It never carries a name, an email address or any health-related data.
window.dataLayer = window.dataLayer || [];
// Fired only after Dynamics 365 confirms the lead was created
window.dataLayer.push({
event: 'generate_lead',
form_id: 'quote_request_health',
lead_product: 'health_insurance',
lead_score: 'hot', // scoring band, never the raw personal data
lead_channel: 'sales_network',
crm_status: 'created',
campaign_source: 'google', // from the stored UTM parameters
campaign_medium: 'cpc',
campaign_name: 'health_brand_fr'
});Simplified, illustrative excerpt. Field names and values are examples.
Microsoft Dynamics 365 CRM integration
The website forms were connected to Microsoft Dynamics 365, so that each submission becomes a lead in the sales network's own tool. The tracking context travels with it.
- UTMs are captured on landing and kept for the whole session, even if the visitor browses several pages before filling in a form.
- Campaign data is submitted with the form in dedicated fields, next to the lead itself.
- The sales network sees the origin: each lead in the CRM carries the campaign that produced it, and its qualification status can be read back against that campaign.
The result is a shared key between the web and the CRM. Marketing no longer reports "form submissions". It reports leads that the sales network accepted, grouped by campaign.
E-commerce tracking for online offers
Some offers can be taken online. For these, GA4 e-commerce tracking was designed around the insurance journey instead of a classic shop. Offers are treated as items, with product, category and price information, and the standard GA4 e-commerce events describe each step.
- Landing page:
view_itemwhen an offer is displayed. - Quote started:
begin_checkoutwhen the visitor enters the quote flow. - Quote steps:
add_shipping_infoandadd_payment_infoevents mapped to the real steps of the flow, so drop-offs are visible step by step. - Final quote or purchase:
purchase, with a unique transaction ID to prevent duplicates.
With the full funnel in GA4, the team can see where visitors leave and which campaign they came from.
Business impact & results
The main result is clarity. The marketing team now has a view of the whole funnel, from the first ad click to the lead in the CRM, and to the online offer conversion.
- Optimization on lead quality: Google Ads (SEA) and Meta campaigns are judged on the quality of the leads in the CRM, not on superficial web metrics such as clicks or form views.
- Budget follows revenue: spend can move away from campaigns that bring volume but no qualified leads, and toward those that feed the sales network.
- A reliable, compliant pipeline: no tag fires before explicit consent, and no personal data is sent to analytics tools.
- One shared language: marketing, IT and the sales network read the same events, with the same names, and the data is tied directly to sales network revenue.
Looking to turn this clean pipeline into visual executive reports? See how we built the Automated Looker Studio dashboards for Bains de Saillon.