Using
WhatsApp Business API
with ChatVector

Overview

For businesses using the WhatsApp Business API, ChatVector can automatically detect incoming leads and qualify them without manual work. No forwarding messages, no searching reference codes.  Once set up, it just works.

※ Requires Business plan

Requirements

  • Website with a button somewhere that will open a window to chat in WhatsApp
  • WhatsApp Business API with any provider (Meta Cloud API, 360dialog, Twilio, MessageBird, Respond.io, etc.)
  • Google Ads account
  • ChatVector Business plan

Step 1: Install the tracking script on your website

Same as the standard setup. Add the ChatVector tracking script to your website. Full installation details and your unique script tag are available in your ChatVector dashboard.

The script automatically detects any button or link that opens WhatsApp and injects a unique reference code into the message. No need to modify your existing WhatsApp buttons.

Step 2: How tracking works

When a visitor arrives from Google Ads:

  1. Script captures the gclid parameter from the URL
  2. Stores gclid in localStorage
  3. Generates a unique reference code (e.g. CV847291)
  4. Sends tracking data to ChatVector

When a visitor clicks your WhatsApp button:

  1. Script intercepts the click
  2. Prepends reference code to the message
  3. Opens WhatsApp with modified message

Example message:

[Ref: CV847291] Hi, I'd like to enquire about your services

The power of WhatsApp Business API

This is where the difference between WhatsApp Business and WhatsApp Business API becomes clear. With the standard app, ChatVector has no way of knowing if a message was sent or even if the WhatsApp button on your website was clicked.

With WhatsApp Business API, however, your provider can programmatically forward incoming messages to ChatVector automatically (by calling one of ChatVector's webhooks). We know a conversation started without you lifting a finger.  This is where auto-qualifying leads without any intervention becomes possible, and is covered in step 3.

Step 3: Auto-Qualify leads

With the WhatsApp Business API integration, ChatVector automatically knows when a message is received from a customer. Now you need to decide how to tell ChatVector which leads are worth tracking.

Rule of thumb
Only qualify leads you want more of. If someone is asking about jobs, or enquiring about services you don't offer, don't qualify them. This trains Google Ads to find more of the right customers. In our experience, despite all the different smart bidding strategies viable in Google Ads, and different ways to set things up, one thing holds true: quality beats quantity.

If you have a choice between sending 20 conversions (with 5 of them being junk) or sending 10 clean conversions, send the 10. We've seen time and again that volume doesn't cancel out noise. Google's algorithm learns from everything you feed it. Keep the signal clean.

That being said, even sending a signal to Google for every message received will be vastly superior to sending a signal for every time a visitor clicks on your WhatsApp chat button on your website (regardless of whether they send a message)

We have three auto-qualification options, available via different webhooks.

Option A: Auto-qualify on message received

Any message containing a valid reference code is immediately marked as a lead. Zero manual work.

ChatVector will scan messages for a valid reference and, if found, qualify the corresponding row in the dashboard (which contains the unique Google identifier, ie. gclid).

This works well if most of your WhatsApp traffic is genuine enquiries. If you get a lot of noise including job seekers, spam, wrong numbers, or just low quality engagements, consider one of the other options.

Option B: AI qualification

ChatVector analyses the message content and qualifies based on intent.

Set your criteria with a simple prompt to filter for genuine customer intent, and let ChatVector decide what's worth tracking.

For example you may run a fertility clinic and tell AI to only qualify when a genuine IVF patient contacts you and to avoid job seekers or people hoping to donate their sperm or eggs in exchange for payment.

Option C: Trigger from your CRM

Call the ChatVector API when a lead converts in your system.
This would involve capturing the reference from the client's WhatsApp message in your CRM and at the desired point, you call the webhook to ChatVector (passing the reference in the call).

If a customer pays at some point in future, you would need to use option C which allows you to programmatically pass the value of the sale to ChatVector, for sending to Google. This could be used in "maximise conversion value" campaigns for smart bidding, or just for more complete revenue visibility in the Google Ads dashboard. It is totally fine to use webhook A/B/C for auto-qualifying and then webhook C for marking as paid.

Full technical details and code examples for all options are available in your ChatVector dashboard.

Step 4: Sync to Google Ads

Now that ChatVector knows which leads you want Google to send you more of, we can inform Google by sending them the appropriate gclid corresponding with the reference in the customer message.

In the case of payments, an additional "conversion value" field is sent as well.

With the Business plan, qualified leads sync to Google Ads automatically.

No CSV exports, no manual uploads, it all happens in the background without any intervention.

Because we have automated qualification here, we also have a cooldown field which allows you to specify a waiting period between auto qualification and sending information to Google.  In case you want to un-qualify a WhatsApp message that was qualified in step 3.

Data flow

Visitor clicks Google Ad
   ↓
Lands on your site (gclid captured)
   ↓
Clicks WhatsApp button (ref code added)
   ↓
Message received by your WhatsApp Business API Provider
   ↓
Your provider calls ChatVector's webhook
   ↓
ChatVector matches ref code → gclid
   ↓
Qualification (Auto / AI / CRM trigger)

    ↓
Optional: Wait for cooldown period
   ↓
Automated sync to Google Ads

For any further questions feel free to get in touch over email on support@chatvector.co or via our WhatsApp number.

Stop optimizing for clicks. Start optimizing for leads.

You are already paying for the traffic. Now capture the sales data Google Ads is missing and cut your CPA by up to 30%. Setup takes less than 10 minutes.