> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to set Google Ads (Adwords) data on Crisp users profile

*Learn how to store Google Ads attribution data on Crisp sessions and trigger a conversion from chat activity.*

If a visitor lands on your website with a **GCLID** parameter, you can mark the Crisp session as coming from Google Ads, then fire a Google Ads conversion when that visitor starts a relevant chat interaction.

---

# ${color}[#0080dd](Before you start)

This example uses the **$crisp JavaScript SDK** and the Google Ads `gtag` conversion call. You should adapt the conversion rule to your own business case, because a visitor message may not always represent a qualified lead or sale.

__You will need:__
* Crisp chatbox installed on your website
* Google Ads tracking installed and configured
* Your Google Ads **Conversion ID** and **Conversion Label**
* Consent handling that matches your legal and analytics requirements

---

# ${color}[#0080dd](Example implementation)

The snippet below detects a **gclid** in the URL, stores a session data flag in Crisp, and fires a conversion when the visitor sends a message.

```html
<script>
  window.$crisp = window.$crisp || [];

  $crisp.push(["on", "session:loaded", function() {
    var searchParams = new URLSearchParams(window.location.search);
    var hasGoogleClickId = searchParams.has("gclid");
    var currentSource = $crisp.get("session:data", "google_ads");

    if (hasGoogleClickId && currentSource === null) {
      $crisp.push(["set", "session:data", [[[
        "google_ads",
        "visitor"
      ]]]]);
    }

    $crisp.push(["on", "message:sent", function() {
      if ($crisp.get("session:data", "google_ads") === "visitor") {
        $crisp.push(["set", "session:data", [[[
          "google_ads",
          "conversion"
        ]]]]);

        gtag("event", "conversion", {
          send_to: "AW-999999999/HO-xxxxx-XXXXXXXXXX"
        });
      }
    }]);
  }]);
</script>
```

Replace **AW-999999999/HO-xxxxx-XXXXXXXXXX** with your own Google Ads conversion destination.

---

# ${color}[#0080dd](Adapt the conversion rule)

In this example, a **message:sent** event is treated as the conversion. For many businesses, you may want a stricter rule, such as a form submitted, email added, pricing page conversation, demo request, or a backend-confirmed purchase.

| Read the [$crisp Methods documentation](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/) if you want to track another Crisp chatbox event.
