Offline conversion tracking lets Google Ads learn from the WhatsApp chats that actually turned into sales, not just from people who tapped a button. In Egypt this matters more than almost anywhere. Your ads can bring fifty WhatsApp messages in a day, and forty of them might be “بكام؟” followed by silence. If Google treats all fifty as equal, it will happily find you more people who ask the price and disappear.
This guide shows a practical way to set up offline conversion tracking: connecting WhatsApp leads to real sales and send those sales back to Google Ads. It’s written for Egyptian businesses that sell mainly through WhatsApp: clinics, real estate, furniture, education, home services, e-commerce stores that confirm orders by chat. You’ll need a little patience and a Google Sheet, but no expensive CRM.

In this guide
Why counting WhatsApp clicks isn’t enough in Egypt
Most Egyptian advertisers who track anything at all track WhatsApp clicks. That’s a good start. We explain how to set it up in our guide to WhatsApp conversion tracking. But a click on a WhatsApp button only shows interest. It doesn’t show who bought.
In the Egyptian market, the gap between WhatsApp leads and actual purchases is often wide, for a few reasons:
- Price checking is normal. Many people message several businesses to compare prices before they decide. That’s healthy, but it means a large share of chats never become customers.
- Cash on delivery and confirmation calls. In e-commerce, an order isn’t really an order until the customer confirms and pays on delivery. Some orders get cancelled or refused at the door.
- Long decisions for big purchases. Real estate, education and medical procedures can take weeks of messages before anyone pays.
- Very different lead quality between campaigns. A broad keyword like “شقق” brings very different people than “شقة 3 غرف التجمع الخامس تقسيط”.
If your Google Ads bidding only sees WhatsApp clicks, it can’t tell these WhatsApp leads apart. Offline conversion tracking closes that gap by telling Google which clicks became paying customers.
How offline conversion tracking works, in plain language
The idea behind offline conversion tracking is simple, even if the setup has a few moving parts.
- When someone clicks your Google ad, Google adds a unique code to the landing page URL. This is the GCLID (Google Click ID). It’s turned on automatically when auto-tagging is enabled in your account.
- Your website saves that GCLID in the visitor’s browser.
- When the visitor taps your WhatsApp button, your website adds a short reference code to the pre-filled WhatsApp message, and records which GCLID belongs to which reference code.
- Your sales team sees the reference code in the WhatsApp chat. When the customer pays, they write the reference code and the sale value in a sheet.
- You upload the sales (GCLID, time, value) to Google Ads. Google matches them to the original ad clicks.

From then on, you can see in Google Ads which campaigns, keywords and ads brought real revenue. And if you use value-based bidding, Google can start optimizing for sales instead of chats.
What you need before you start
Offline conversion tracking is not complicated, but it does need a few pieces in place:
- Auto-tagging turned on in Google Ads (Admin, then Account settings, then Auto-tagging). Without it, there’s no GCLID.
- Access to your website to add a small script, either through Google Tag Manager or a code snippet plugin in WordPress.
- A Google account that can create a Google Sheet and an Apps Script.
- WhatsApp links in a standard format, like
https://wa.me/201000000000(a placeholder number). Floating widgets that don’t use normal links need extra work. - A sales team that will log sales. This is the part that usually fails. If nobody writes down which reference code bought, there’s nothing to upload.
That last point deserves honesty: offline conversion tracking is 30% technical and 70% habit. Before you build anything, agree with your team on who logs sales, where, and when.
Step 1: Save the GCLID and add a reference code to WhatsApp
This script is the heart of offline conversion tracking for WhatsApp. It does three things. It saves the GCLID when someone lands from an ad. When they tap a WhatsApp link, it adds a short code like “(Ref R7K2Q)” to the pre-filled message. And it sends the code and the GCLID to your Google Sheet in the background.
Add it to your site with Google Tag Manager (a Custom HTML tag firing on All Pages) or a header code plugin. Replace the WEBHOOK value with your own Apps Script URL from step 2.
<script>
(function () {
var WEBHOOK = 'https://script.google.com/macros/s/YOUR-DEPLOYMENT-ID/exec';
var KEY = 'dmm_gclid';
var MAX_AGE = 90 * 24 * 60 * 60 * 1000; // 90 days
var gclid = new URLSearchParams(window.location.search).get('gclid');
if (gclid) {
try { localStorage.setItem(KEY, JSON.stringify({ id: gclid, ts: Date.now() })); } catch (e) {}
}
function savedGclid() {
try {
var d = JSON.parse(localStorage.getItem(KEY));
if (d && Date.now() - d.ts < MAX_AGE) return d.id;
} catch (e) {}
return null;
}
function refCode() {
var r = sessionStorage.getItem('dmm_ref');
if (!r) {
r = 'R' + Math.random().toString(36).slice(2, 7).toUpperCase();
sessionStorage.setItem('dmm_ref', r);
}
return r;
}
document.addEventListener('click', function (e) {
var link = e.target.closest('a[href*="wa.me"], a[href*="api.whatsapp.com"]');
if (!link) return;
var id = savedGclid();
if (!id) return; // not from a Google ad, nothing to match
var ref = refCode();
var url = new URL(link.href);
var text = url.searchParams.get('text') || '';
if (text.indexOf(ref) === -1) {
url.searchParams.set('text', (text ? text + ' ' : '') + '(Ref ' + ref + ')');
link.href = url.toString();
}
navigator.sendBeacon(WEBHOOK, JSON.stringify({
ref: ref, gclid: id, page: location.pathname, time: new Date().toISOString()
}));
}, true);
})();
</script>A few notes on how this behaves:
- It only adds a reference code for visitors who came from a Google ad. Organic visitors see your normal WhatsApp message.
- The code is kept for the whole visit, so a visitor who taps twice gets the same code.
- If your WhatsApp link has no pre-filled text, the script creates one with just the reference code. For WhatsApp leads, it’s better to have a friendly pre-filled message, like “مرحباً، عايز أعرف تفاصيل أكتر”, so the code sits at the end of a natural sentence.
Step 2: Create the Google Sheet and the Apps Script
Create a new Google Sheet with two tabs: clicks and sales.
In the clicks tab, add these headers in row 1: Time, Ref, GCLID, Page.
Then open Extensions, then Apps Script, delete any code there, and paste this:
function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('clicks');
var d = JSON.parse(e.postData.contents);
sheet.appendRow([new Date(), d.ref, d.gclid, d.page]);
return ContentService.createTextOutput('ok');
}Click Deploy, then New deployment, choose Web app, set “Execute as” to Me and “Who has access” to Anyone, and deploy. Google will ask you to authorize the script. Copy the web app URL and paste it into the WEBHOOK line of the script from step 1.
Test it: open your site with ?gclid=test123 at the end of the URL, tap a WhatsApp button, and check that a new row appears in the clicks tab within a few seconds.
Step 3: Log sales the same way every time
In the sales tab, add these headers: Ref, Sale date, Value (EGP), Notes.
Train the people who answer WhatsApp leads on one rule: when a customer pays, find the reference code in the WhatsApp chat and add a row. That’s it. No code, no sale, no row.
It helps to use WhatsApp Business labels too. Create labels such as “New”, “Qualified”, “Paid” and “Not interested”. They don’t feed into Google Ads directly, but they make it much easier for the team to find paid customers at the end of the day.

Step 4: Create the offline conversion action in Google Ads
In Google Ads, go to Goals, then Conversions, then Summary, and click New conversion action. Choose Import, then CRM, files, or other data sources, then Track conversions from clicks. Use these settings:
- Conversion name: WhatsApp sale (offline). Write it down exactly, because your upload must use the same name.
- Goal category: Purchase
- Value: Use different values for each conversion (you’ll send the real sale value)
- Count: One
- Click-through window: 90 days, so long sales cycles still match
Google recommends waiting a few hours after creating a new conversion action before uploading the first file. Use that time to prepare the upload sheet.
Step 5: Build the upload file
Google Ads accepts uploads from a file or directly from a Google Sheet. Create a third tab called upload with these exact headers:
Google Click ID, Conversion Name, Conversion Time, Conversion Value, Conversion Currency
For each sale, look up the GCLID from the clicks tab using the reference code (a simple VLOOKUP or XLOOKUP does the job), and fill in:
- Conversion Name: exactly the name you created, such as WhatsApp sale (offline)
- Conversion Time: the date and time of the sale with the time zone, for example
2026-11-30 14:05:00+02:00. Egypt uses UTC+2 in winter and UTC+3 during summer daylight saving, so make sure the offset matches the date. - Conversion Value: the sale amount, for example 4500
- Conversion Currency: EGP
Then go to Goals, then Conversions, then Uploads, and upload the file, or connect the Google Sheet and set a schedule (daily or weekly). After an upload, Google shows how many rows were imported and how many had errors.
The rules that make or break offline conversion tracking
These details decide whether your offline conversion tracking uploads match or fail:
- The 90-day limit. Google only accepts conversions for clicks that happened within the last 90 days, and within the click-through window you set. Upload at least weekly so nothing expires.
- No GCLID, no match. Some clicks arrive without a GCLID, for example on some iPhone traffic where Google uses other identifiers. Those leads can’t be matched with this simple method. Expect some gap, and don’t panic about it.
- Time must be after the click. A conversion time earlier than the click time is rejected. If your team logs the sale date without a time, use the end of the day.
- One sale per row. If the same customer buys twice, decide whether you upload both purchases or only the first. Be consistent.
- Don’t upload test data. Delete the
test123rows before your first real upload.
A simple weekly routine for offline conversion tracking
Tools are the easy part. What keeps offline conversion tracking accurate is a routine that the whole team follows. Here’s one that works for small teams with one or two people answering WhatsApp leads.
Every day (5 minutes): whoever handles WhatsApp leads adds a row in the sales tab for every customer who paid that day, with the reference code from the chat and the amount. If a chat has no reference code, the customer didn’t come from a Google ad, or deleted the code, and that’s fine.
Every Monday (15 minutes): someone checks the upload tab. Are there sales without a GCLID? That usually means a typo in the reference code. Are there sales older than a few weeks that were never uploaded? Upload them now, before they pass the 90-day limit.
After each upload (5 minutes): read the upload summary in Google Ads. If rows failed, the error message usually tells you why: a wrong conversion name, a time before the click, or a missing time zone. Fix the sheet, not Google Ads.
Once a month (30 minutes): compare WhatsApp leads, sales and revenue by campaign. This is the meeting where budgets move. Pause or rework keywords that bring many WhatsApp leads but no sales, and give more room to the ones that sell.
Every three months: review the setup itself. Has someone added a new WhatsApp button that doesn’t use a normal link? Has the website theme changed? Has the sales team started using a second WhatsApp number? Small changes like these silently break offline conversion tracking, and a quarterly check catches them before they cost you months of data.
It also helps to name one owner. When “everyone” is responsible for logging WhatsApp sales, nobody is. One person who owns the sheet, even for twenty minutes a week, makes the difference between a system that works and one that’s abandoned after a month.
What changes once offline conversion tracking is running
The first change is visibility into which WhatsApp leads turn into revenue. After two or three uploads, add the “WhatsApp sale (offline)” conversion column to your campaigns and keywords. You’ll often find that the campaign with the most WhatsApp clicks is not the one with the most sales.
Here’s an example to show what that can look like. The numbers are invented to illustrate the method, they’re not from a real client:
| Campaign | WhatsApp clicks | Sales uploaded | Revenue (EGP) |
|---|---|---|---|
| Furniture – broad Arabic | 300 | 6 | 54,000 |
| Bedrooms – specific models | 120 | 9 | 99,000 |
| Brand name searches | 60 | 8 | 70,000 |
In this made-up example, the broad campaign looks best if you only count clicks, and worst if you count revenue. That’s exactly the kind of decision offline conversion tracking makes possible.

The second change is bidding. Once you have a steady flow of uploaded sales (Google’s systems work better with more conversions, so aim for a regular volume every month), you can test making the offline sale your primary conversion and moving to a value-based strategy such as Maximize Conversion Value or Target ROAS. Do this gradually. Keep the WhatsApp click as a secondary conversion so you still see it in reports, and give the new strategy a few weeks to learn.
Privacy and data protection in Egypt
Egypt’s Personal Data Protection Law (Law No. 151 of 2020) sets rules for collecting and processing personal data. The offline conversion tracking method in this guide is fairly light: it stores a click ID and a random reference code, not names or phone numbers. But your WhatsApp chats and sales sheet do contain personal data, so:
- Mention in your privacy policy that you measure advertising performance and contact requests.
- Limit access to the sales sheet to the people who need it.
- Don’t upload customer names, phone numbers or chat text to Google Ads with this method. It doesn’t need them.
If you plan to upload phone numbers or emails (Google calls this enhanced conversions for leads), get legal advice first and read Google’s current requirements. This article is practical guidance, not legal advice.
Is offline conversion tracking worth it for a small business?
Whether offline conversion tracking pays off depends on how you sell. If you sell low-priced products where most chats become orders, WhatsApp click tracking may be enough for now. If you sell anything where the price is high, the decision takes time, or many chats go nowhere, offline conversion tracking is one of the most valuable things you can add to a Google Ads account.
On budget: we manage Google Ads for Egyptian businesses from a minimum ad budget of $300 a month. At that level, the main benefit is visibility, knowing which keywords bring buyers. As the budget and the number of sales grow, the bidding benefits start to matter more.
We won’t promise a specific increase in sales from tracking alone. Tracking doesn’t sell anything. It shows you, and Google, where the sales really come from, so your money goes there.
Get help connecting WhatsApp to real sales
If you’d like us to check whether offline conversion tracking makes sense for your business, or set it up with you, start with a free review of your Google Ads account and tracking. Read more about how we work with Egyptian businesses on our digital marketing agency in Egypt page, see our Google Ads and PPC services, or check pricing. If phone calls matter as much as WhatsApp for you, our guide to Google Ads call tracking covers that side.
Google’s official documentation on importing offline conversions is in the Google Ads Help Center, and the Apps Script basics are explained in Google’s Apps Script documentation. Both are worth bookmarking, since menus change from time to time.
Frequently asked questions
What is offline conversion tracking in Google Ads?
It’s a way to tell Google Ads about sales that happen away from your website, for example in WhatsApp, on the phone or in your shop. You save the Google Click ID when the visitor arrives, then upload confirmed sales with that ID so Google can match them to the original ad click.
Can I do offline conversion tracking without a CRM?
Yes. A Google Sheet is enough for most small and medium businesses. The method in this guide uses a sheet to store click IDs and reference codes, and another tab to log sales. A CRM becomes useful when you have many salespeople or a lot of leads.
How often should I upload offline conversions?
At least once a week, and daily if you have many sales. Google only accepts conversions from clicks in the last 90 days, and frequent uploads give smart bidding fresher information.
Will customers notice the reference code in the WhatsApp message?
They’ll see a short code like “(Ref R7K2Q)” at the end of the pre-filled message. Most people don’t mind, especially if the message itself is friendly. Some will delete it, and those chats simply won’t be matched.
Does this work for phone calls too?
The same idea works, but calls are harder because there’s no text message to carry the reference code. You can ask callers for a code shown on the website, or use call tracking software that records the click ID automatically.
