# Setting Up Enhanced Conversions with Wix

Source: https://support.wix.com/en/article/setting-up-enhanced-conversions-with-wix (updated 2026-02-13)
Related: Wix developer documentation, https://dev.wix.com/docs/llms.txt; Help Center index, https://support.wix.com/en/llms.txt

Enhanced conversions improve the accuracy of conversion tracking by securely sending hashed first-party data to Google Ads. This is particularly beneficial for cross-device and cross-browser interactions.

Setting up enhanced conversions for leads and purchases with Wix helps you get more accurate reporting and better ad campaign optimization. For example, if you run an online store, using enhanced conversions can help you track customer actions more precisely, leading to better targeted ads.

---

## Step 1 | Google Ads conversion action setup

First, configure a conversion action in Google Ads to track conversions accurately.

### To configure a conversion action in Google Ads:

1. Sign in to [your Google Ads account](https://ads.google.com/).
2. [Create a new conversion action](https://support.google.com/google-ads/answer/12216226?hl=en&ref%5Ftopic=12215426&sjid=487370106070662481-EU).

> **Tip:** Take note of the conversion ID and label for later use.

---

## Step 2 | Create a Wix form

> **Important:** This step is for leads only. Skip to step 3 if you want to set up enhanced conversions for purchases.

After setting up a conversion action in Google Ads, create a Wix form that triggers a lead event when the form is submitted. This form will collect the necessary data for enhanced conversions.

### To create a Wix form:

1. [Go to your editor](https://manage.wix.com/account/site-selector/?actionUrl=https%3A%2F%2Fwww.wix.com%2Feditor%2F%7BmetaSiteId%7D%3FeditorSessionId%3D%7Besi%7D%26).
2. [Add a form to your site](https://support.wix.com/en/article/wix-forms-adding-and-setting-up-a-form-on-your-site#step-1-add-a-form-to-your-site).

![A screenshot showing how to add new Wix Forms in the Wix Editor.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/3eadcc04-813b-4e69-acf6-5bb047eced92/2024/09/24/b4fd208c-4cbf-4d9b-aab9-b8ce136ed56e/4b8e5b13-b3f4-4924-91a9-f41c472ba3a2.png)

---

## Step 3 | Customizing form field names with Velo

Customize your form's field names with Velo to ensure they match Google's requirements.

### To customize form field names:

1. Click the form in your editor.
2. Click **Edit Form**.
3. Click the text field of a form field and click **Settings**.
4. Click the **Advanced** tab.
5. Edit the text after the last underscore in **Field key**. For example, change first\_name\_0099 to first\_name\_my\_key.

> **Important:** The field key cannot be changed later. If you close the Settings menu before changing the field key, you will need to delete the field and add it again.

![A screenshot of the Advanced Settings menu highlighted in the Form Fields settings menu.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/a1c473d0-e600-4b63-ae67-997d73da1139/2024/12/18/68cb5f7e-d80d-4544-9172-bf30169becbc/08a39032-da68-4931-9178-7b1c226eb323.png)

---

## Step 4 | Conversion methods

Once your form fields have been customized, it's time to set up your enhanced conversions. Choose whether to implement custom code within your site's dashboard, or use Google Tag Manager to create a new tag and configure user data variables.

## Method 1: Custom code implementation

**Leads:**

1. Copy the code snippet provided below and enter it into a text editor.

```javascript
<script>
   if (typeof conversion_id === 'undefined') {
   //Replace 'AW-CONV-ID' with your conversion ID
   var conversion_id = 'AW-CONV-ID'; //must be associated with Google Tag installed at Wix


}
   if (typeof conversion_label === 'undefined') {
   //Replace 'CONVERSION-LABEL' with your conversion label
   var conversion_label = 'CONVERSION-LABEL';
}


   function registerListener() {
       window.wixDevelopersAnalytics.register('conversionListener', (e, p) => {
           if (e === 'Lead') {
               if (!dataLayer) {
                   console.error('Google Tag (gtag) is not loaded. ');
               } else {
                   function gtag() { dataLayer.push(arguments); }


                   const findKey = prefix => Object.keys(p.userData).find(k => k.startsWith(prefix));
                   const addressKey = findKey('multi_line_address');
                   const addressData = p.userData[addressKey] || {};
                   const findAddressKey = prefix => Object.keys(addressData).find(k => k.startsWith(prefix));


                   gtag('event', 'conversion', {
                       'send_to': conversion_id + '/' + conversion_label,
                       'user_data': {
                           'email': p.userData[findKey('email')] || '',
                           'phone_number': p.userData[findKey('phone')] || '',
                           'address': {
                               'first_name': p.userData[findKey('first_name')] || '',
                               'last_name': p.userData[findKey('last_name')] || '',
                               'street': addressData[findAddressKey('addressLine')] || '',
                               'city': addressData[findAddressKey('city')] || '',
                               'region': addressData[findAddressKey('subdivision')] || '',
                               'postal_code': addressData[findAddressKey('postalCode')] || '',
                               'country': addressData[findAddressKey('country')] || ''
                           }
                       }
                   });
               }
           }
       });
}


   window.wixDevelopersAnalytics ?
   registerListener() :
   window.addEventListener('wixDevelopersAnalyticsReady', registerListener);
</script>
```

1. Replace the placeholder values with your values:  
   * **AW-CONVERSION\_ID:** Your Conversion ID from Google Ads.  
   * **LABEL\_ID:** Your Label ID from Google Ads.
2. Copy the entire code snippet.
3. [Go to Custom Code](https://manage.wix.com/my-account/site-selector/?siteType=HtmlWeb&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/manage-website/embeds/?&title=Select%20a%20site&buttonText=Go+to+Custom+Code) in your site's dashboard.
4. Click **+ Add Custom Code** at the top right.
5. Click the **Code Type** tab and select **Marketing**.
6. Click the **Code Settings** tab and paste the code snippet into the text box.
7. Enter a name for your code.  
**Tip:** Give it a name that is easy to recognize so you can quickly identify it later.
8. Select an option under **Add Code to Pages**:  
   * **All pages:** This adds the code to all of your site's pages, including any new pages that you create in the future. Choose whether to load the code only once per visit, or on each page your visitor opens.  
   * **Choose specific pages:** Use the drop-down menu to select the relevant pages.
9. Select the **Head** section under **Place Code in**.
10. Click **Apply**.

**Purchases:**

1. Copy the code snippet provided below and enter it into a text editor.

```javascript
<script>


   if (typeof conversion_id === 'undefined') {
   //Replace 'AW-CONV-ID' with your conversion ID
   var conversion_id = 'AW-CONV-ID'; //must be associated with Google Tag installed at Wix




}
   if (typeof conversion_label === 'undefined') {
   //Replace 'CONVERSION-LABEL' with your conversion label
   var conversion_label = 'CONVERSION-LABEL';
}


   function registerListener() {
       window.wixDevelopersAnalytics.register('conversionListener', (e, p) => {
           if (e === 'Purchase') {
               if (!dataLayer) {
                   console.error('Google Tag (gtag) is not loaded. ');
               } else {
                   function gtag() { dataLayer.push(arguments); }


                   const userData = {
                       'email': p.userData.email || '',
                       'phone_number': p.userData.phone || '',
                       'address': {
                           'first_name': p.userData.first_name || '',
                           'last_name': p.userData.last_name || '',
                           'street': p.userData.address || '',
                           'city': p.userData.city || '',
                           'region': p.userData.region || '',
                           'postal_code': p.userData.postal_code || '',
                           'country': p.userData.country || ''
                       }
                   };


                   gtag('event', 'conversion', {
                       'send_to': conversion_id + '/' + conversion_label,
                       'value': p.revenue || 0,
                       'currency': p.currency || 'USD',
                       'transaction_id': p.orderId || p.id || '',
                       'user_data': userData
                   });
               }
           }
       });
}


   window.wixDevelopersAnalytics ?
   registerListener() :
   window.addEventListener('wixDevelopersAnalyticsReady', registerListener);
</script>
```

1. Replace the placeholder values with your values:  
   * **AW-CONVERSION\_ID:** Your Conversion ID from Google Ads.  
   * **LABEL\_ID:** Your Label ID from Google Ads.
2. Copy the entire code snippet.
3. [Go to Custom Code](https://manage.wix.com/my-account/site-selector/?siteType=HtmlWeb&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/manage-website/embeds/?&title=Select%20a%20site&buttonText=Go+to+Custom+Code) in your site's dashboard.
4. Click **+ Add Custom Code** at the top right.
5. Click the **Code Type** tab and select **Marketing**.
6. Click the **Code Settings** tab and paste the code snippet into the text box.
7. Enter a name for your code.  
**Tip:** Give it a name that is easy to recognize so you can quickly identify it later.
8. Select an option under **Add Code to Pages**:  
   * **All pages:** This adds the code to all of your site's pages, including any new pages that you create in the future. Choose whether to load the code only once per visit, or on each page your visitor opens.  
   * **Choose specific pages:** Use the drop-down menu to select the relevant pages.
9. Select the **Head** section under **Place Code in**.
10. Click **Apply**.

## Method 2: Google Tag Manager implementation

1. [Sign in to your Google Tag Manager account](https://tagmanager.google.com/?hl=en#/home).
2. Click **Tags**.
3. Click **New**.
4. Select **Tag Configuration**.
5. Click **Google Ads** and select **Google Ads Conversion Tracking**.
6. Enter your conversion ID and label.
7. Enable **Include user-provided data from your website**.
8. Click the drop-down and select **New Variable**.
9. Select the **Code** option.
10. Click the drop-down and select **New Variable**.
11. Click **Variable Configuration** and select **Data Layer Variable**.
12. Enter "user\_data" into the **Data Layer Variable Name** text field.
13. Save both variables.
14. Click **Triggering** and select **Custom Event**.
15. Enter "generate\_lead" or "purchase" into the **Event name** text field.
16. Save the tag configuration.
17. Go to [Marketing Integrations](https://www.wix.com/my-account/site-selector/?buttonText=Manage%20Integrations&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/marketing-integration) in your site's dashboard.
18. Click **Connect** under **Google Tag Manager**.
19. Click **Add Google Tag Manager**.
20. Enter your Google Tag Manager ID.
21. Click **Save**.

> Learn more about [setting up enhanced conversions for web with Google Tag Manager](https://support.google.com/google-ads/answer/13262500?hl=en).

---

## FAQs

Click a question below to learn more about setting up enhanced conversions.

**Why should I use enhanced conversions?**

Enhanced conversions provide improved cross-device conversion measurement, more accurate reporting, and better ad campaign optimization.

**How do I find my Google Ads conversion ID and label?**

You can find your conversion ID and label in your Google Ads account under Tools & Settings > Conversions.

**Can I use enhanced conversions with any form on Wix?**

Currently, Wix supports enhanced conversions with new Wix forms that trigger a lead event upon form submission.

**Do I need coding knowledge to set up enhanced conversions?**

Yes, basic coding knowledge is helpful for custom code implementation. However, you can also use Google Tag Manager, which requires less coding.

**How do I test if enhanced conversions are working?**

Always test the implementation in a development environment first and regularly monitor conversion tracking to ensure functionality.
