Rutba CRM

Connect a business end to end, for AI agents

The connection runbook: website, consent, store, forms, WhatsApp and Google Ads, with the decisions to ask first and the proof that each link works.

This page is for an AI agent, or a person, connecting a business's website, store, WhatsApp and ads to Rutba CRM, so that every customer arrives with the campaign that brought them. It follows Setup order for AI agents: its rules apply here too. Labels in bold are exactly what the screen shows. A note that begins The person does this step is a hand-over: stop, say exactly what to do and where, and wait.

Work in the order below. Each part ends with a check; do not move on until it passes.

Before you start: ask these questions

Ask the person and write the answers down. They decide what you set up.

Question Why it matters
Is the site WordPress, and is it a WooCommerce store? WordPress uses the WordPress plugin, which brings tracking, forms and orders at once
Must visitors agree to cookies before tracking, by the law of the visitors' countries? If yes, which cookie banner does the site use? Consent is off by default and every visitor is counted. Turn it on only when the law requires it, and then a banner is needed (part 2)
Which WhatsApp number should customers write to? Is it used today in the WhatsApp Business app on a phone? A number connected to Rutba CRM works through Meta's Cloud API and stops working in the phone app. Using a second number keeps the app
Who manages the Meta Business account, the Google Ads account and the WordPress admin? Their owners do the hand-overs
Are sales made only through the store, or also as deals (companies, quotes, projects)? Decides Also count a won deal as a sale (part 6)
Which deal stage means a real, qualified opportunity? Decides Count a lead when a deal reaches (part 6)

1. Pipeline first

A pipeline must exist before forms, stores and channels can be connected. Follow steps 1 to 4 of Setup order for AI agents. If the business wants a "qualified" lead event, make sure the pipeline has a stage for it, for example Qualified.

Guides: WordPress plugin, Tracking.

  1. WordPress: Team → WordPress → Download the plugin (version …), then Make a connection code for the site's address.

The person does this step: uploading and activating the plugin in WordPress, pasting the connection code and selecting Connect there.

  1. Another site: Tracking → add the site, then copy the line.

The person does this step: pasting the tracking line into the head of every page.

  1. Decide consent with the person, on the site's card in Tracking. It is off by default: the card says Runs for all visitors, without asking for consent. and every visitor is counted. Keep it off unless the law in the visitors' countries requires consent before analytics cookies, for example in the European Union. To turn it on, select Require consent. Then:
    • The card says Runs only after the visitor consents, and a visit counts only after the visitor accepts statistics or marketing cookies.
    • CookieYes, Complianz and Cookiebot work on their own: the tracking script reads their answer, including an answer from an earlier visit, and stops when the visitor refuses.
    • Any other banner must call crmConsent() when the visitor accepts. See Tracking.
    • No banner at all: either the person adds one of the three, or select Stop requiring consent on the card. Never leave consent required with no banner.
  2. With consent on, show the banner on the first page a visitor sees. The campaign is read from the address of the page where tracking starts; before consent it waits in the browser tab only, unsent, and goes with the first visit after consent.

Check:

  1. On the site's card in Tracking, select Test the connection, then Open my site for the test, and come back: The connection works. with every line ✓ means part 2 is done. A ✗ line says what to fix. See Tracking.
  2. Open Connections, find the site and select Check now.
    • "Checked: The tracking code is on the home page." is right.
    • "The code is on the home page, but the site asks for consent first and no cookie banner was found that gives it." means step 3 is not done.
  3. Open the site with ?utm_source=google&utm_medium=cpc&utm_campaign=test-crm, accept statistics cookies if the site asks, and open two more pages.
  4. In Tracking, the visitor shows in On the site now, and the card shows Last event: with the time. Browsers with Do Not Track or Global Privacy Control, and ad blockers, record nothing: test without them.

3. The store

Guides: WooCommerce, Shopify, Salla and Zid.

With the WordPress plugin, the WooCommerce connection and its webhooks are made for you. Otherwise follow the WooCommerce guide, with Order deleted and Order restored too.

The person does this step: turning on Order Attribution in WooCommerce. Orders are credited to a campaign from the order's own attribution.

Check: place a test order from a link with ?utm_source=test&utm_campaign=crm-test. The order appears on the customer in Contacts, the store card shows Last event:, and Reports → Sales by campaign lists crm-test.

4. Website forms

Guide: Website forms. With the WordPress plugin, Contact Form 7, WPForms and Elementor Pro forms are connected by the plugin.

Check: send one enquiry from the site with ?utm_campaign=test-form in the address. A contact and a deal appear, and the form's Recent enquiries shows the campaign.

5. WhatsApp

Guide: WhatsApp.

  1. Decide the number with the person (see the questions above). The number must be on Meta's WhatsApp Cloud API.

The person does this step: in Meta, the Business app, the system-user token, the Phone number ID, the WhatsApp Business Account ID and the App secret, typed into Connect WhatsApp Business under Conversations → Channels; then the Webhook address and Verify token in Meta, subscribed to messages.

  1. Website buttons: once the channel is on, every link on the tracked site to wa.me/NUMBER or api.whatsapp.com/send?phone=NUMBER carries a short reference, such as Ref: K7M2PQ, at the end of the message. Nothing needs to change on the site. The reference ties the chat to the visit that clicked it, so the contact gets the visit's campaign and ad click, for up to 7 days. It works only for visitors who consented to tracking. Share links with no number are left alone.

Check:

  1. From a phone, send a WhatsApp message to the number. It appears in Conversations, with a new contact and a deal in the channel's stage. Reply from Rutba CRM: the reply reaches the phone.
  2. Open the site with ?utm_source=google&utm_medium=cpc&utm_campaign=test-crm, accept cookies, click the site's WhatsApp button and send the message as it is, with its reference.
  3. Open the new contact: its Customer journey shows First visit with the campaign test-crm.

The free reply window is 24 hours from the customer's last message; after that only approved templates can be sent.

6. What counts as a sale and a lead

Guide: Advertising. Advertising → What counts as a sale:

  • A paid or confirmed store order always counts as a sale.
  • Also count a won deal as a sale: tick it when sales are made as deals (companies, projects, services). With a store, leave it off unless deals are also sold outside the store. If both are on, a won deal and a store order from the same ad click, or the same person without a click, within 30 days are one sale: the second is kept as skipped and not sent.
  • Count a lead when a deal reaches: choose the qualified stage. Then a lead counts when a deal of that person reaches the stage, once per person, instead of for every new contact. Leave Every new contact (the default) to count each new contact.

Select Save. You see "Saved.".

7. Google Ads

Guide: Google Ads.

  1. Use Connect with Google when the Google Ads card offers it; it creates the conversion actions and sends every hour.
  2. Otherwise use the script:
    • In Google Ads, create the conversion actions as imports from clicks, one for sales and one for leads.
    • Type their exact names into Conversion name for sales and Conversion name for leads, turn the card on and save.
    • Make a Read and write API key for the script.

The person does this step: creating the conversion actions, pasting the key into the script, Authorize, and scheduling the script Daily in Google Ads. Auto-tagging must stay on.

  1. Results go only for sales and leads of visitors who came through a Google ad click, consented to tracking, and became the contact: by an order, a form, or a WhatsApp button. Past and imported orders are not sent.

Check: on Connections, the Google Ads line shows:

State Meaning
"Nothing to send yet: no sale has come from a Google ad click so far." Correct until the first sale from a Google click. Check parts 2 and 3
"… waiting for Google's next run." Results are queued; the script or the hourly link sends them
Last collected by Google: with a time Working
"Google has not collected results for over three days." The script stopped: check it in Google Ads → Tools → Scripts

Running campaigns: ask before you change anything.

  • Is there already a purchase conversion from the website in Google Ads? Then the action for Rutba CRM's sales must not be primary beside it, or a sale is counted twice. Start it as secondary and compare.
  • Is there text in Final URL suffix, at the account or on a campaign? Keep a copy. A suffix on a campaign replaces the account's for that campaign.
  • The script writes the custom parameter campaign again every day from the campaign's name in Google Ads. To change a campaign's tag, change its name; a hand-written parameter does not last.
  • Was a campaign tagged differently before? Link the old name in Campaign returns; never edit what is recorded.

Check the sales, not only the costs: open Advertising → Conversions and follow Conversions for one real order. Handed to the script is not Google's acceptance.

Remove the test: mark test orders with Mark as a test on the customer, or cancel them in the store, when the person agrees.

8. Final check

  1. Connections: every item Working or, before any data, Waiting for data with the reason shown. Select Check now on each.
  2. One full test: from a Google ad or a link with utm_ values, accept cookies, then send a form, place an order, or click WhatsApp. The contact shows the campaign, and the sale or lead appears in Advertising under the platform's counts.
  3. Tell the person what is done and what is still theirs, using the hand-over notes above.

What does not work, and what to say

Request Answer
Keep using the WhatsApp Business app on the phone with the connected number Not available. Connect a second number, or keep the app and do not connect the number
Count visits without any consent banner while consent is required Not possible. Add a supported banner, call crmConsent(), or select Stop requiring consent when the law in the visitors' countries allows it
Attribute a WhatsApp chat to Google Ads when the visitor did not consent to tracking Not possible: the visit is not recorded, so there is nothing to tie
Send past orders to Google Ads Not done: only sales after the setup, from a recorded ad click, are sent

Last updated 2026-12-01