# How it works: Shopify to Google Ads

## Client-side events

| **Event Name**   | **Description**                                 |
| ---------------- | ----------------------------------------------- |
| page\_view       | User has viewed any page                        |
| view\_item       | User has viewed an item on your website         |
| view\_item\_list | User has seen a collection page on your website |

Client-side events are tracked via Littledata's app embed directly to Google Ads.

Client-side events respect [Shopify's consent mode](https://help.littledata.io/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api), so if your store has a cookie banner, users can opt out of the tracking of these events.

All events are sent with your chosen Conversion Tag (*e.g., AW-123*). Conversion events include **value** and **currency** of the purchase, along with the Conversion Tag + Conversion Label (*e.g. AW-123/label*).

### How to check that client-side events are being sent

Google Ads does not offer a real-time view of events to verify that your entire setup is functioning correctly. However, for client-side events, you can use [Google Tag Assistant](https://tagassistant.google.com/) to check which events are being sent from your store to your Google destinations. By clicking 'Add Domain', you can verify how your data is being sent to Google.

![Google Tag Assistant](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-fed26fbcb2ba7e7c4237d250825f3b1d0b8c99aa%2Fgoogle_tag_assistant_add_domain.png?alt=media)

## Conversion actions

Littledata's Shopify to Google Ads connection automatically creates three conversion actions. They are automatically assigned a role, and their main purpose is to improve your targeting.

| **Conversion name**                        | **Role**                                                    |
| ------------------------------------------ | ----------------------------------------------------------- |
| `Purchase - Littledata`                    | Primary conversion, including all purchases                 |
| `New Customer Purchase - Littledata`       | Secondary conversion, only first-time customer conversions  |
| `Returning Customer Purchase - Littledata` | Secondary conversion, only returning customers' conversions |

### Using multiple primary conversion actions

If your Google Ads campaign is configured to track multiple primary conversion actions, Google will optimize towards all of them, treating each as a signal for bidding and budget allocation. This may dilute the effectiveness of your bidding strategy.

We recommend keeping our `Purchase - Littledata` conversion action as the only primary conversion action in your campaign. This ensures Google optimizes for the most accurate purchase data captured by our server-side tracking.

If you need to compare or validate Littledata's performance against other sources, you can set our conversion action as secondary temporarily, but keep in mind it won't be used for smart bidding in this case.

## How to enable Enhanced Conversions

You will need to enable **Enhanced Conversions for Leads** and accept **Customer data terms** in your Google Ads account.

You can do this either in the Littledata installation process (where there is a step that will redirect you to the above-mentioned settings) or beforehand.

1. **Accept Customer data terms**

* In your Google Ads account, go to **Goals** > **Conversions** > **Settings**, expand **Customer data terms**, and accept.

After you're done it should look like this:

![Accept Customer data terms](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-2984972f98cea40acb4219890ea94b787df75e8e%2Fdata_terms_accepted.png?alt=media)

The terms may have previously been accepted in Google Ads.

{% hint style="info" %}
If you can't see Customer data terms, it is because the conversions are tracked by a manager account. The customer data terms need to be accepted by the manager's account and any Google Ads manager account that uploads on behalf of the manager account using cross-account tracking.
{% endhint %}

1. **Accept Enhanced conversions for leads**

* In your Google Ads account, go to **Goals** > **Conversions** > **Settings** > expand **Enhanced conversions for leads**, turn on and save
* For Littledata's implementation, it does not matter which method (Google tag / Google Tag Manager) you select before saving.

After you're done it should look like this:

![Accept Enhanced conversions for leads](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-f3c5b556b866da85a90beb0c1ec3fe6281570297%2Fec4l_enabled.png?alt=media)

1. **Creating a conversion action in Google Ads**

A conversion action is created automatically by Littledata during the setup process.

The name of the conversion action will be **Purchase - Littledata** so you can easily identify and measure the performance of our integration.

You can see your conversion action by going to **Goals** > **Summary**

![conversion action in Google ads](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-3cd9537e525b3c7b76e1578a4e4d122fd382d941%2Faction.png?alt=media)

The **Inactive** status means that the conversion action is not currently being tracked or used for optimization in your campaigns.

After the conversion action starts receiving data, the **Inactive** status should disappear while the conversion value and the number of conversions should increase.

### Why Enhanced Conversions for leads instead of web?

[Google's documentation](https://support.google.com/google-ads/answer/9888656?hl=en) states that

* **Enhanced Conversions for web** are relevant for advertisers who want to track sales and events that happen on a website.
* **Enhanced Conversions for leads** are relevant for advertisers who want to track sales that happen off a website (for example, phone or email) from website leads.

It may seem counterintuitive that Shopify stores would track leads.

However, where the Google cookie ID (`gclid`) is missing, **Enhanced Conversions for web** will reject events, so **Enhanced Conversions for leads** is the safer option to ensure even conversions without a known cookie will be processed.

### Matching first-party user data

The server-side event payload contains SHA256 hashed (which is the industry standard for one-way hashing) customer data:

* email address
* first name
* last name
* address

And data that can be sent unhashed:

* city
* country
* postal code

Google will try to [match this first-party data with Google accounts](https://support.google.com/google-ads/answer/7474263).

**Email and phone matching**

* Google keeps track of the email addresses and phone numbers for Google accounts and the corresponding hashed strings for those email addresses or phone numbers
* If there's a match with the hashed strings we send, Google associates the account with the data.

**Mailing address matching**

* Google joins hashed name and mailing address data for Google accounts to construct a matching key.
* Google will try to construct a similar key based on the data we send, and if there's a match Google associates the account with the matching key.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.littledata.io/integrations/google-ads/google-ads-how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
