Skip to main content
NewNMC’s advertising guidelines for doctors are in force from 6 Oct 2026. See what to change, and get a free compliance auditNew NMC advertising rules for doctors: what to change
Paid Ads

Offline Conversion Import From a HIS: Matching GCLID to UHID Without PHI

A technical walk-through of capturing GCLID on forms, storing it against a lead ID, linking to the HIS record by UHID inside the hospital, and sending Google only a completed-appointment event.

Offline Conversion Import From a HIS: Matching GCLID to UHID Without PHI

This is a technical article for hospital marketing operations, CRM administrators and the engineer or vendor who looks after the hospital information system (HIS). The task is to send Google Ads a single fact, that a click led to a completed appointment, without sending any health information. The key design choice is to keep the link between the click and the patient record inside the hospital, and send Google only a click identifier, an event name, a time and a value.

Our earlier article on offline conversion tracking for clinics explains why the loop matters for Google Ads and Meta. This one is narrower: the identifiers, the data flow, the upload and the failure modes. It assumes a hospital with a CRM or enquiry system and a HIS that issues a unique health ID, commonly called a UHID.

A note on regulation: how India's data protection law applies to your specific data flows needs advice from your counsel and data protection owner. This article describes a minimisation pattern, not a legal opinion.

The design principle

Three systems hold three kinds of data.

  • The website and CRM hold the enquiry: name, phone, the click ID, the form and the lead ID.
  • The HIS holds the clinical and administrative record, keyed by UHID.
  • Google Ads should receive only: a click ID, a conversion action, a time, a value, and optionally hashed contact identifiers if you use enhanced conversions for leads.

The bridge between the CRM and the HIS is a mapping your hospital controls: lead ID to UHID, created when a front-desk or call-centre user registers the enquirer as a patient. That mapping never leaves the hospital. Google never sees the UHID or any clinical field.

Step 1: Capture the click ID

Google's help on offline conversion imports using GCLID sets out the requirements.

  • Auto-tagging must be on.
  • You must be able to change code on the pages to capture the GCLID parameter.
  • Store each GCLID with the prospect's information in your lead system. The GCLID is case sensitive.
  • Add a hidden GCLID field to every form, and a script that reads the URL parameter and stores it in local storage or a cookie. Google's sample sets a 90-day expiry.
  • Create the conversion actions first and wait 4 to 6 hours before uploading conversions for them.

Google reminds advertisers to observe local rules on cookie consent. Hospitals should apply their consent approach before the script stores anything, and the privacy notice should say that campaign identifiers are used for measurement.

Where the click leads to a phone call rather than a form, the GCLID is not available at the call. Use call tracking that records the session's click ID against the call, as described on our call tracking and attribution page. For WhatsApp enquiries, capture the click ID on the page before the user is sent to the chat, and attach it to the conversation record on your side.

Step 2: Store it against the lead, not the patient

When the form submits, the CRM should create a lead record with fields such as:

FieldExample (hypothetical)Notes
lead_ida generated unique IDThe only key shared outward
gclidthe captured value, exactly as receivedPreserve case
clickcapturedattimestamp with time zoneNeeded for the 90-day check
source_pagethe landing URLUseful for the URL audit
consent_flagsmarketing and measurement consentDrives what you may upload
uhidempty at this stageFilled in later, inside the hospital

Do not put diagnosis, symptom text or treatment interest into the same table as the GCLID. If the form has a free-text message field, keep it out of any export that feeds the upload job.

Pioneer CRM is one place for enquiries, lead ownership and follow-ups, which is the kind of lead table this step needs.

Step 3: Link the lead to the HIS record internally

When the enquirer becomes a registered patient, front-desk staff or an integration set the uhid on the lead. Two ways to do it:

  1. Manual selection. The coordinator picks the existing lead when registering the patient. Simple, but error-prone.
  2. Integration by phone number or appointment ID. The HIS or booking system returns an appointment ID that the CRM stores. A match on a normalised phone number is a fallback, and needs a rule for shared family numbers.

Our service page on EHR and CRM integration describes the integration work. Whatever you choose, test it for false matches. A wrong UHID link sends the wrong value for a click.

The completed-appointment event comes from the HIS status: registered, billed or checked out. Choose the status that really means the patient attended. A booked appointment is a weaker event than a completed one.

Step 4: Build the export without PHI

The upload job reads only completed appointments and outputs rows with these fields, which map to Google's click conversion fields:

  • the click identifier (GCLID);
  • the conversion action name;
  • the conversion time, with a time zone, in the format Google specifies;
  • a value and currency, if you use values;
  • an order or transaction ID, to prevent duplicates and allow later adjustments.

Google's developer documentation on uploading click conversions lists the required fields: the conversion action, the date and time with a time zone in the format yyyy-mm-dd HH:mm:ss followed by the offset, the value and currency code, and the click ID. The order ID is optional but strongly recommended, because adjustments require it if it was set at import.

Use a hashed or random transaction ID, not the UHID. If you set the order ID to the UHID, you have put a health identifier into an advertising system. Use the lead ID or a random event ID that the CRM generates.

Name the conversion action in plain terms such as "Appointment completed". Do not create actions named after diagnoses or procedures. The action names are visible to everyone with access to the Google Ads account.

Want this applied to your practice? Get a free paid ads audit.

Book my free audit

Step 5: Choose the upload route

Check the current state of the API route before you build. Google's documentation notes that from 15 June 2026, requests to the Google Ads API's upload click conversions method fail unless the developer token has previously uploaded offline or enhanced conversions, and recommends the Data Manager API instead. Google's Data Manager API upgrade guide says that API supports offline conversions and enhanced conversions for leads through a single ingest-events method, does not require a developer token, and uses a fast-fail model rather than partial failure. It also says the destination's operating account must be the Google Ads conversion customer.

For many hospitals the simplest route is not custom code. Google's help on GCLID imports describes Data Manager connections for sources such as cloud storage, SFTP, Google Sheets, several databases, Salesforce and HubSpot, so your engineer may be able to point a scheduled file or table at the account. Choose the route your team can monitor.

Step 6: Check the window and the timing

The help page ties the click-to-conversion cycle to 14 or 90 days depending on the data source, so confirm which applies to your connection. For events inside the window:

  • Upload at least daily, so conversions arrive in order.
  • Upload the event time, not the upload time. Using the time of upload distorts the delay report.
  • Do not upload events whose click is older than the window; the platform will not import them.

If your appointments often follow clicks by more than the window, consider also sending an earlier event, such as consultation booked, and treat the completed appointment as an analysis metric in your CRM. Our piece on conversion values for treatments with long sales cycles covers value design for that case.

Step 7: Reconcile

Every upload run should produce a small report: rows read, rows valid, rows uploaded, rows rejected and the reason. Google's diagnostics in the account show import status and errors. Common causes of rejection are an unrecognised or malformed click ID, a click outside the window, a conversion action not yet ready, and a bad time format.

Run a monthly reconciliation. Pick a sample of completed appointments, trace each back to its lead, click ID and upload row, and confirm the chain. The sample should include appointments from calls and WhatsApp, because those channels break the chain most often.

Privacy checks before launch

  1. Confirm that no UHID, name, diagnosis, department or treatment text is in the upload file or the conversion action names.
  2. Confirm that consent flags gate the export.
  3. Restrict who can read the upload file and the mapping table.
  4. Keep logs without clinical content.
  5. Get your data protection owner to approve the data map.

If you later add hashed email and phone for enhanced conversions, treat them as personal data and approve them separately. Our article on enhanced conversions for leads covers what to hash.

Where to start

  1. Turn on auto-tagging and add the hidden GCLID field and capture script to every form.
  2. Add a click ID and consent fields to the lead record.
  3. Decide how a lead becomes a UHID inside the hospital, and test false matches.
  4. Pick the HIS status that means the appointment was completed.
  5. Build an export with click ID, action name, time, value and a random event ID only.
  6. Choose the Data Manager route or a supported connection, and test with a few rows.
  7. Reconcile monthly.
Filed underoffline conversion import HISgclid uhid matchingoffline conversions hospital google adsgoogle ads data manager api offline conversionsgclid capture form hospital

About the author

Co-Founder & CTO · Gurugram, India

Arush builds the systems the rest of the company runs on — the patient-acquisition pipelines, the AI chatbots, the analytics that tie a single click to a booked appointment. If a campaign reports a number, it's because something his team built is tracking it.

Free guide · 17 pages

The Patient Acquisition Blueprint

A 90-day plan from first search to booked appointment.

The Pioneers Brief — one essay, three benchmarks, one teardown, every Thursday. Subscribe free →

Free paid ads audit

Your next chapter starts with a conversation.

Three quick questions. We come prepared with a plan for your specialty and city.

  • A 30-minute call with a healthcare specialist
  • Your top three growth opportunities, in writing
  • Honest advice — even if that means not hiring us
  • No obligation and no hard sell
You’ll speak with a senior strategist
Consultations are hosted by Arush Thapar’s team.
Step 1 of 3Takes 30 seconds

What do you want to improve first?

Details stay privateNo obligationReply within 1 working day

Client portfolio · Healthcare websites

Work relevant to offline conversion import from a his matching gclid to uhid.

Explore client work →