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

# WBuy

> How to connect WBuy to Nemu Dashboard

## Setting Up Webhooks

1. In the Nemu panel, go to **Settings** > **Webhooks**.

2. Search for **WBuy** and click on **Connect**.

<img src="https://mintcdn.com/nemu/BVHKoN9-uWWl8D7J/assets/pages/integracoes/wbuy/1.png?fit=max&auto=format&n=BVHKoN9-uWWl8D7J&q=85&s=e0ba47272afc2559d5fa71428f355b05" alt="" width="1282" height="553" data-path="assets/pages/integracoes/wbuy/1.png" />

3. Define a **name** for your webhook and click on **Connect**.

<img src="https://mintcdn.com/nemu/BVHKoN9-uWWl8D7J/assets/pages/integracoes/wbuy/2.png?fit=max&auto=format&n=BVHKoN9-uWWl8D7J&q=85&s=2b779842ac9f8192f690dab9da95979b" alt="" width="564" height="366" data-path="assets/pages/integracoes/wbuy/2.png" />

4. Click the button to **copy** the **webhook URL** generated by Nemu and click on **Finish**.

<Info>
  Keep this URL copied, as we will need it for the next steps.
</Info>

<img src="https://mintcdn.com/nemu/BVHKoN9-uWWl8D7J/assets/pages/integracoes/wbuy/3.png?fit=max&auto=format&n=BVHKoN9-uWWl8D7J&q=85&s=07b6b6447e63ccf51d41569507d9bde7" alt="" width="595" height="421" data-path="assets/pages/integracoes/wbuy/3.png" />

5. In the WBuy admin panel, in the left sidebar, navigate to **General** > **Platform** and click on **API and webhooks**.

6. Click on the **New webhook** button.

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/4.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=f5c5c13fe51800a50b007ed800fb9f8a" alt="" width="1366" height="608" data-path="assets/pages/integracoes/wbuy/4.png" />

7. You need to create **2 webhooks** pointing to the same URL you copied earlier in Nemu:

<Info>
  It is necessary to create two different webhooks to capture both order creation and order updates.
</Info>

* **First webhook:** notification type **Orders (order) | POST**
  <img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/5.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=bf73b5f6f349ce36d2dbfe3c309d3f46" alt="" width="521" height="335" data-path="assets/pages/integracoes/wbuy/5.png" />

* **Second webhook:** notification type **Order status (order\_status) | PUT**

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/6.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=e94db5fc1a578c2bc54d16df13ca5e59" alt="" width="580" height="360" data-path="assets/pages/integracoes/wbuy/6.png" />

<Tip>
  After configuring the webhooks, Nemu will start receiving sales from WBuy in your dashboard.
</Tip>

## Installing Nemu Pixel on WBuy

1. In the WBuy admin panel, in the left sidebar, navigate to **Your Store** > **Settings** > **Scripts per page**.

2. Click on **New script**.

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/10.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=688788aa0667c498601131363fc38b92" alt="" width="1366" height="607" data-path="assets/pages/integracoes/wbuy/10.png" />

3. Paste the [Nemu pixel script](/en/onboarding/configuring-pixel#4-click-on-the-button-to-copy-the-generated-script) copied earlier. This script must be in the `<head>` tag and set on **all pages**.

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/11.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=08cd00c15830c41ec33acbeba028afdd" alt="" width="1138" height="607" data-path="assets/pages/integracoes/wbuy/11.png" />

## UTM Passing Script

1. In the WBuy admin panel, in the left sidebar, navigate to **Your Store** > **Settings** > **Scripts per page**.

2. Click on **New script**.

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/10.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=688788aa0667c498601131363fc38b92" alt="" width="1366" height="607" data-path="assets/pages/integracoes/wbuy/10.png" />

4. Paste the UTM passing script below. This script must be in the `<head>` tag and **added only on the cart page**.

<Info>
  The UTM passing script is essential to ensure that campaign parameters are transferred correctly during the checkout flow.
</Info>

<img src="https://mintcdn.com/nemu/KidzCpESYpocg5v4/assets/pages/integracoes/wbuy/12.png?fit=max&auto=format&n=KidzCpESYpocg5v4&q=85&s=c149bc0b2c67476e27d68001be415027" alt="" width="1138" height="601" data-path="assets/pages/integracoes/wbuy/12.png" />

```js UTM Passing Script theme={null}
<script>
   var timer = setInterval(function () {
      const location =
         window.trackingNemu?.nemuUtms ||
         new URL(document.location.href)?.searchParams;
      const fields = [
         "src",
         "sck",
         "utm_source",
         "utm_medium",
         "utm_campaign",
         "utm_content",
         "utm_term",
         "nemu_source",
         "nemu_medium",
         "nemu_campaign",
         "nemu_content",
         "nemu_adset",
         "nemu_term"
      ];
      var links = document.getElementsByTagName("a");

      for (var i = 0, n = links.length; i < n; i++) {
         if (links[i].href.includes("#")) continue;
         if (links[i].href) {
            let link = new URL(links[i].href);
            fields.forEach((field) => {
               if (location.get(field))
                  link.searchParams.set(field, location.get(field));
            });
            let href = link.href;
            links[i].href = href;
         }
      }
   }, 500);
</script>
```
