Indian team connecting messaging conversations with analytics CRM and appointments

Short answer: To track WhatsApp leads in GA4 and a CRM, treat it as three separate measurements. (1) Record the website click on a wa.me button as a GA4 event through Google Tag Manager. (2) Join the chat to its campaign: put a short reference code in the prefilled message for website traffic, and read the referral object and ctwa_clid from the WhatsApp Cloud API webhook for click-to-WhatsApp ads. (3) Let the CRM record qualification and sale, then send those outcomes back to GA4 (Measurement Protocol), Google Ads and Meta. GA4 alone never sees the conversation.

On this pageThree WhatsApp entry pathsTrack WhatsApp clicks in GA4Join chats to campaignsClick-to-WhatsApp adsThe CRM lead recordSend outcomes backReconciling the numbersQA checklistSources

Need this done for you? GrowthSparx offers a fixed-scope lead tracking and attribution setup: GA4, Google Ads, Meta, WhatsApp, calls and CRM wired into one dashboard, usually live in 2–3 weeks.

Benchmark reference: the public 2025–2026 numbers behind this guide (Meta and Google CPC/CPM in India, CPL ranges by industry, landing-page conversion, real estate funnel rates, WhatsApp API pricing) are collected and graded in our India lead generation benchmarks 2026 report.

How do WhatsApp leads arrive, and what can each path be tracked with?

Most Indian lead-gen businesses get WhatsApp leads through three doors. Each needs a different tracking method, and mixing them up is the commonest reason WhatsApp shows up as "direct" or "unknown" in reports.

Entry pathExampleWhat identifies the sourceWhere it is recorded
Website button or floating icon"Chat on WhatsApp" on a project landing pageUTMs and click IDs from the landing session, joined via a reference code in the prefilled messageGA4 (click), CRM (chat and outcome)
Click-to-WhatsApp adMeta ad with a "Send message" button opening WhatsAppreferral.source_id (ad ID) and ctwa_clid in the webhookCRM and Meta; never touches your website or GA4
Offline or untaggedQR code on a hoarding, number on a brochure, number saved from a portal listingA distinct prefilled message or number per mediumCRM only

This guide assumes your chats land in a WhatsApp Business API inbox or CRM that receives webhooks. On the free WhatsApp Business app there are no webhooks, so steps 2 and 3 become manual tagging by the sales team. If you are still choosing, see WhatsApp Business app vs API vs CRM.

How do you track WhatsApp button clicks in GA4?

A WhatsApp click-to-chat link has the format https://wa.me/<number>, with the number in full international format and no zeros, brackets or dashes, and an optional prefilled message as ?text= with URL-encoded text (WhatsApp Help Center). For an Indian number: https://wa.me/919876543210?text=Hi%2C%20I%20want%20details. Our WhatsApp link generator builds these.

GA4's enhanced measurement already logs a click event with outbound=true and link_url when someone clicks a link to another domain (Google Analytics Help). That is fine for a quick look, but it lumps WhatsApp in with every other outbound link and does not tell you which button was tapped. Set up a dedicated event in Google Tag Manager instead:

  1. Add a data attribute to each button so you know where it sits, for example <a href="https://wa.me/91..." data-wa-location="hero">, "sticky_footer", "pricing_table".
  2. Create a trigger: Triggers → New → Click – Just Links. Fire on Some Link Clicks where Click URL matches RegEx wa\.me|api\.whatsapp\.com|whatsapp://. Google's click trigger documentation explains the Just Links type and its Wait for Tags and Check Validation options. Leave Wait for Tags on; the click opens a new app and can cut the hit short on mobile.
  3. Create a variable of type Auto-Event Variable → Element Attribute, attribute data-wa-location.
  4. Create the tag: Google Analytics: GA4 Event, event name whatsapp_click, parameters wa_location = the variable above, wa_ref = the reference code (next section), page_location = Page URL.
  5. Register custom dimensions in GA4 Admin for wa_location and wa_ref (event scope), or they will not appear in standard reports.
  6. Test in GTM Preview and GA4 DebugView on a real phone: one tap must produce exactly one whatsapp_click.

Should it be a key event? We mark whatsapp_click as a key event for reporting but do not import it into Google Ads as a primary conversion. A tap is intent, not a lead: people tap, see the app open, and close it. Keep generate_lead for confirmed enquiries, as set out in our GA4 lead generation tracking setup.

Never put the phone number or message text in GA4. Google's policies say no data may be passed that Google could recognise as personally identifiable, explicitly including "email addresses, personal mobile numbers" (GA4 PII policy). Your own business number in link_url is fine; the visitor's number is not.

How do you connect a WhatsApp chat to the campaign that drove it?

The GA4 click and the incoming WhatsApp message are two unconnected records: one has UTMs but no person, the other has a person but no UTMs. A reference code in the prefilled message joins them. This is the method we implement most often:

  1. On page load, generate a short code (5–6 characters, for example K7Q2M) and store it in a first-party cookie alongside the session's utm_source, utm_medium, utm_campaign, gclid, gbraid, wbraid, fbclid, landing page and the GA4 client ID (from the _ga cookie).
  2. Rewrite the WhatsApp link so the prefilled text ends with the code: "Hi, I'd like details on 3 BHK in Sector 150. Ref: K7Q2M".
  3. On click, send the same payload to your server (or a small webhook, a Google Sheet via Apps Script, or the CRM's web-to-lead endpoint) so the code is stored with its attribution before the chat starts.
  4. When the message arrives, the inbox or CRM looks for Ref: XXXXX, finds the stored attribution and writes it onto the new lead.

A minimal version of the client-side part:

var ref = getCookie('wa_ref') || Math.random().toString(36).slice(2,7).toUpperCase();
setCookie('wa_ref', ref, 30);
document.querySelectorAll('a[href*="wa.me"]').forEach(function(a){
  var u = new URL(a.href); var t = u.searchParams.get('text') || 'Hi';
  u.searchParams.set('text', t + ' Ref: ' + ref); a.href = u.toString();
});
dataLayer.push({event: 'wa_ref_ready', wa_ref: ref});

Practical rules: keep the code at the end so people are less likely to delete it; measure how many chats arrive without a code on your own traffic, and record those as "website – ref missing" rather than "direct". Use a different fixed code per offline medium, such as HOARDING-NOIDA or BROCHURE-EXPO, for QR codes.

How do you track leads from click-to-WhatsApp ads?

Click-to-WhatsApp ads skip your website entirely, so GA4 and the reference-code method do not apply. Meta passes the source in the webhook instead. When a chat starts from one of these ads, the WhatsApp Cloud API messages webhook includes a referral object with source_id (the ad ID), source_type (ad), source_url, headline, body and ctwa_clid, the ad click ID (Meta webhook reference). A trimmed example:

"messages": [{ "from": "919876543210", "type": "text",
  "referral": { "source_type": "ad", "source_id": "23849103758201934",
    "headline": "Message our team", "ctwa_clid": "Afq9KxR2..." },
  "text": { "body": "Is the 2 BHK still available?" } }]

Map these to CRM fields on lead creation: source = meta_ctwa, meta_ad_id = source_id, ctwa_clid, and the first message. Two caveats from Meta's reference: the referral object is attached only to messages sent through a click-to-WhatsApp ad, so write it to the lead when the chat starts rather than looking for it later; and ctwa_clid "is omitted entirely for messages originating from an ad in WhatsApp Status". Store the ad ID even when the click ID is missing.

If you use a BSP inbox rather than your own webhook, check that it writes these fields to the contact record rather than only showing the ad preview in the chat window. Our WhatsApp CRM integration guide covers the integration itself.

What should the WhatsApp lead record in the CRM contain?

FieldSourceUsed for
wa_id / phone (E.164, e.g. +919876543210)Webhook fromContact identity; hashed match key for Google and Meta uploads
entry_path (website / ctwa / offline)Rule on creationSplitting reports by door
wa_refParsed from first messageJoining to stored web attribution
utm_source, utm_medium, utm_campaign, landing_pageLookup on wa_refChannel and campaign reporting
gclid / gbraid / wbraidLookup on wa_refGoogle Ads conversion import
ga_client_idLookup on wa_refSending outcomes to GA4 via Measurement Protocol
meta_ad_id, ctwa_clidWebhook referralMeta Conversions API for business messaging
first_message_at, first_reply_atWebhook timestampsResponse-time tracking
status, qualified_at, won_at, deal_value, rejection_reasonSales teamOutcome events and quality analysis
marketing opt-in (yes/no, date, wording)Chat flow or formPermission for template messages

Create the lead on the first inbound message, not on the first click. One contact may start several chats over months; keep one contact with multiple enquiries rather than duplicate contacts.

How do you send qualified WhatsApp leads back to GA4, Google Ads and Meta?

GA4. Google's recommended lead events include qualify_lead, working_lead and close_convert_lead (recommended events). Send them from the CRM with the Measurement Protocol: an HTTP POST to https://www.google-analytics.com/mp/collect?measurement_id=G-XXXX&api_secret=... with the stored client_id. Google notes the API secret must stay server-side and events can be backdated by up to 72 hours (Measurement Protocol guide), so send stage changes daily. In the example below, 9000 is an illustrative value per qualified lead, not a benchmark.

{"client_id": "1234567890.1728000000",
 "events": [{"name": "qualify_lead",
  "params": {"currency": "INR", "value": 9000, "lead_source": "whatsapp"}}]}

Google Ads. If the stored attribution includes a GCLID, or you have the phone number, upload the qualified or converted stage as an offline conversion. WhatsApp gives you the phone in E.164 already, which suits enhanced conversions for leads, where Google matches hashed phone and email.

Meta. For click-to-WhatsApp ads, send events through the Conversions API for business messaging with action_source: "business_messaging", messaging_channel: "whatsapp", and user_data containing your whatsapp_business_account_id and the ctwa_clid. Supported event names include LeadSubmitted, QualifiedLead and Purchase. Meta states it does not deduplicate these events, so send each stage once, and that they should represent interactions in the messaging thread (Meta for Developers). Website-originated WhatsApp leads go through the standard CAPI route described in tracking Meta ads leads to CRM and sales.

Each template or service message you send while qualifying the lead has a cost on the API; current India rates are in our WhatsApp Business API cost guide.

Why don't WhatsApp clicks, chats and leads match?

MetricWhereWhy it differs from the next row
whatsapp_clickGA4Includes taps that never send a message, repeat taps, and desktop users without WhatsApp Web set up
Conversations startedInbox / APIIncludes chats from ads, saved numbers and existing customers that had no website click
New leads createdCRMExcludes existing contacts, support queries and spam
Qualified leadsCRMYour sales definition, not a tracking artefact

Worked example (illustrative): a clinic sees 400 whatsapp_click events in a month, 240 chats with a valid website reference code, 300 total new chats (the other 60 from click-to-WhatsApp ads and saved numbers), 210 new leads after removing existing patients and spam, and 70 qualified. Click-to-chat rate = 240 ÷ 400 = 60%. Reporting "400 WhatsApp leads" would overstate leads by about 1.9×. Track each row separately and watch the ratios, not just totals.

WhatsApp tracking QA checklist

TestPass
Tap each WhatsApp button on Android and iPhoneOne whatsapp_click per tap in DebugView, correct wa_location
Prefilled message contains the reference codeCode visible at the end of the text on every button
Send the message from a test phone with UTMs on the landing URLCRM lead shows the same UTMs, landing page and GA4 client ID
Edit out the code before sendingLead created as "website – ref missing", not "direct"
Start a chat from a live click-to-WhatsApp adLead has meta_ad_id and ctwa_clid populated
Same person messages twice in a weekOne contact, no duplicate lead
Mark a test lead qualifiedOne qualify_lead in GA4 and one event in Meta Events Manager; no repeat on re-save
Inspect GA4 event parametersNo phone numbers, names or message text

If you would rather have this built and run for you, our WhatsApp CRM automation service covers inbox, CRM and tracking together.

Sources

FAQ

Common questions

Can GA4 track WhatsApp conversations?

No. GA4 can record the click on a WhatsApp button on your website, but the conversation happens inside WhatsApp, outside the web session. To count chats, qualified leads and sales, your WhatsApp Business API inbox or CRM must record them and, if you want them in GA4, send outcome events back through the Measurement Protocol using the visitor's GA4 client ID, never their phone number.

How do I track WhatsApp button clicks in Google Tag Manager?

Create a Click – Just Links trigger that fires when Click URL matches wa.me or api.whatsapp.com. Attach a GA4 Event tag named something like whatsapp_click with parameters for button location and page. Test in GTM Preview and GA4 DebugView, confirm one click creates one event, then register the parameters as custom dimensions so they appear in reports.

How do I know which campaign a WhatsApp lead came from?

For website buttons, add a short reference code to the prefilled message and store the visitor's UTMs and click IDs against that code; when the message arrives, your CRM looks up the code. For click-to-WhatsApp ads, the Cloud API webhook includes a referral object with the ad ID and a ctwa_clid click ID. Calls and walk-ins need their own source capture.

Should a WhatsApp click be a key event in GA4?

Usually as a secondary signal, not your main lead. A click only shows intent; many people tap and never send a message. Mark whatsapp_click as a key event if you need it for reporting, but optimise ads on started conversations or qualified chats recorded in your CRM. Keep generate_lead for confirmed enquiries so your lead counts are not inflated.

What is ctwa_clid in WhatsApp?

ctwa_clid is the click ID Meta attaches when someone starts a chat from a click-to-WhatsApp ad. It arrives in the referral object of the WhatsApp Cloud API messages webhook. Store it on the CRM lead and send it back with later conversions through Meta's Conversions API for business messaging. Meta omits it for chats that start from ads shown in WhatsApp Status.

Need a practical growth system?

Book a review of your current acquisition, content and conversion workflow.

Book a Strategy Call
RS
Founder & Performance Marketing Lead, GrowthSparx

Rinku works across SEO, lead generation, paid acquisition and conversion systems for Indian and global businesses. This article uses practical operating frameworks, identifies limitations and links changing platform facts to primary sources.

Have a question? Message us directly on WhatsApp—usually a reply within a few hours.

Chat on WhatsApp