> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Ads

> Optimize and measure conversions in your Google Ads campaigns.

Measuring **conversions** (for example, a completed transaction or a qualified lead) is better than measuring only the **conversation start**, because it optimizes the campaign toward real business results. Not every conversation ends in a purchase: by reporting conversions, Google can learn which clicks generate value and adjust bids and audiences to improve return.

## Setup

**1. Request activation from Jelou**

To activate Google Ads tracking in your account, you must send an email to [ayuda@jelou.ai](mailto:ayuda@jelou.ai) requesting activation of Google Ads tracking for your organization.

The email **must include the organization name** for which you want to activate tracking and **must be sent from the email address of the owner** of that organization.

**2. Request Google whitelisting (CTM Allowlist)**

Submit an allowlist/whitelisting request to Google using the [CTM Allowlist Request Form](https://docs.google.com/forms/d/e/1FAIpQLSfHTPejpP1lT_pqFmXelptHeN4XCPjYz0NcdZXK3GvKPa_RHA/viewform).

## Campaign setup

Here is a guide on how these campaigns are configured:

**1. Select the objective and campaign type**

Start a **new campaign**, select **Leads** as the objective and choose **Search** or **Performance Max** as the campaign type.

![Select objective and type](https://mintcdn.com/jelouai/ULgwEHLikEppkuDq/assets/images/marketplace/google-ads/step1.webp?fit=max\&auto=format\&n=ULgwEHLikEppkuDq\&q=85\&s=7c857e4d3925f6987bc2bda2e5466730)

**2. Define the campaign goal**

In the section on how you want to achieve your objective, select only **Messages from your ads** as your sole campaign goal.

![Campaign goal](https://mintcdn.com/jelouai/ULgwEHLikEppkuDq/assets/images/marketplace/google-ads/step2.webp?fit=max\&auto=format\&n=ULgwEHLikEppkuDq\&q=85\&s=9368c815e7083e871fc52e587f4b75d3)

**3. Create and configure the Message Asset**

Create a new **Message Asset**. Make sure you only have **Message** and **Image Assets** for the campaign.

![Message setup](https://mintcdn.com/jelouai/ULgwEHLikEppkuDq/assets/images/marketplace/google-ads/step3.webp?fit=max\&auto=format\&n=ULgwEHLikEppkuDq\&q=85\&s=6efd7ab8e36a64aeec95d7bbf5cd9c69)

**4. Complete the message details**

You will be asked to add:

* **WhatsApp phone number**
* **Starter message**
* **Select a call to action**

## Track conversions

When a conversation arrives from a Google **Message Ad**, the following variables will automatically be inserted into memory:

```json theme={null}
{
  "_google_ads_tracking": {
    "gclid": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_",
    "campaignId": 123,
    "adGroupId": 456,
    "adId": 789
  }
}
```

These are the properties that are stored:

| Property | Example | Description |
| - | - | - |
| `gclid` | `ABCDEFGHIJ…` | **Google Click ID**. This is the identifier that is uploaded back to Google Ads to attribute the conversion. |
| `campaignId` | `123` | ID of the Google Ads campaign that generated the click. |
| `adGroupId` | `456` | ID of the ad group within that campaign. |
| `adId` | `789` | ID of the specific ad that was clicked. |

You can learn more about how to read these variables at: [Memory](https://docs.jelou.ai/guides/variables/memory.md).

## Use cases

You can use these properties as the value of the properties of a [tracking event](https://docs.jelou.ai/en/guides/observabilidad/eventos.md), with the syntax `{{$memory._google_ads_tracking.campaignId}}`. This way, each event is tied to the ad that started the conversation.

> [accordion] Measure qualified leads by campaign
>
> A workflow that qualifies leads coming from Google Ads: in the node where the lead gets qualified, it records the `leadCalificado` event with the `campaignId` (`{{$memory._google_ads_tracking.campaignId}}`) and `adGroupId` (`{{$memory._google_ads_tracking.adGroupId}}`) properties. In your metrics you can see which campaigns and ad groups generate the most qualified leads, not just the most conversations.

> [accordion] Compare the performance of each ad
>
> A workflow that books appointments for several ads in the same campaign: in the node that confirms the appointment, it records the `citaAgendada` event with the `adId` property (`{{$memory._google_ads_tracking.adId}}`). With that breakdown you identify which specific ad converts best and where it makes sense to invest more budget.

> [accordion] Record the purchase with its gclid
>
> A workflow that closes sales over WhatsApp: in the node that confirms the payment, it records the `compraCompletada` event with the `gclid` (`{{$memory._google_ads_tracking.gclid}}`) and `monto` (`{{$context.amount}}`) properties. This way you keep, for each purchase, the identifier Google Ads needs to attribute the conversion.

> [!NOTE]
>
> An event supports up to **5 properties** and names are written in camelCase. `_google_ads_tracking` is only saved in Memory when the conversation came from a **Message Ad**.

## How it works

Google Ads tracking in Jelou allows you to attribute WhatsApp conversations to your ads automatically. When a user clicks on your ad in Google Search, they are redirected to WhatsApp with a pre-filled message that includes an invisible **GCLID** (Google Click ID) encoded in Unicode. Once the user sends that message, Jelou detects and processes this hidden identifier to link the interaction directly to your advertising campaign.

![How Google Ads tracking works](https://mintcdn.com/jelouai/ULgwEHLikEppkuDq/assets/images/marketplace/google-ads/how-it-works.png?fit=max\&auto=format\&n=ULgwEHLikEppkuDq\&q=85\&s=93ae953cb75f7037ec7e309d37baab6f)

> [!WARNING]
>
> Tracking depends on the first message sent by the user. If the user deletes the message before sending it, the ability to track and attribute that conversion to Google Ads will be lost.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.