GUURU for Developers

GUURU for Developers

  • Docs
  • Contacts

›Web SDK

Web SDK

  • Getting Started
  • Public Interface
  • Handling Events
  • Conversion
  • Cookies
  • Examples

SmartChat

  • Getting started
  • Chat Window

    • Getting started
    • Parameters

SmartForm

  • Getting Started

Admin API

  • Getting started
  • API Reference

    • Queries
    • Mutations
    • Types
    • Pagination
  • Examples

Webhooks

  • Getting started
  • Examples

Integrations

  • Facebook
  • Salesforce
  • Zendesk
  • Third Party Messaging

Conversion

Tracking conversions helps you to get insights of which interactions, and Guurus, are resulting in successful purchases. After a chat has been converted, it will be tracked on Partner Portal Interactions, being listed with a green conversion tag. More details on the conversion can be found on the chat details page.

Conversion feature must be enabled, please see loadFeatures initialization option

Automatic conversions

Conversion goals can be set on Partner Portal Conversion under Settings. When creating a conversion goal, give it a memorable name and a target URL to trigger the conversion.

Whenever your user lands on a page that contains the URL pattern on its url, their last chat will trigger a new conversion and be visible on Partner Portal Conversations

Chat Button needs to be initialized in order to trigger the conversion

Example

Your user has questions about item X, so they engage on a conversation with a guuru. After the conversation, the user decides to buy the item X and a module Y. When the transaction is made by the user, they are redirected to a success page. As an example, the success page is https://<company>.com/shop/order/success

An automatic conversion goal could be configured as follows:

{
  name: 'Success shop order',
  url: 'shop/order/success',
  description: 'This is an example goal',
}

Adding value to conversions

It's also possible to add value and currency details to your conversions. When initializing the chat button on a target page, you should use the purchase initialization option with your order information.

This information can be later seen on Partner Portal Conversations details page.

Manually triggered conversions

Chat Button Public Interface exposes the method trackPurchase. It will trigger a conversion on the user last chat, tracking their current page url and value and currency parameters.

Shopify Integration

Shopify imposes restrictions on third-party scripts in the checkout flow. The Shopify thank-you page is part of the Shopify Checkout, where theme scripts and third-party SDKs cannot be loaded. Only sandbox Web Pixels and Checkout UI Extension are supported, and legacy "Additional Scripts" are deprecated.

To track conversions on Shopify, you must configure a Shopify Web Pixel instead of using the standard Chat Button initialization on the checkout page.

Setting up the Web Pixel

  1. In your Shopify admin, go to Settings → Customer events.
  2. Click Add custom pixel.
  3. Give your pixel a name and click Add pixel.
  4. In the code editor, paste the JavaScript pixel code (without <script> tags), replace "<APP_ID>" with your actual Guuru partner ID.
var analytics=api.analytics,browser=api.browser,init=api.init;
analytics.subscribe("checkout_completed", (event) => {
  
  const value = event.data.checkout.totalPrice.amount;
  const currency = event.data.checkout.currencyCode;

  // Load Guuru script
  const script = document.createElement("script");
  script.src = "https://static.guuru.com/loader/v1.0/chat.min.js";
  script.async = true;

  document.head.appendChild(script);

  script.onload = () => {
    if (typeof window.Guuru !== "undefined") {
      window.guuru = window.Guuru();

      window.guuru.init({
        appId: "<APP_ID>",
        purchase: {
          value: value,
          currency: currency
        }
      });
    }
  };

});
  1. Click Save.
  2. Click Connect pixel and confirm the connection.

This code subscribes to the checkout_completed event, loads the Guuru script dynamically, and initializes it with the purchase value and currency from the checkout data.

Testing Conversions setup

To test whether conversion tracking is correctly configured, follow these two steps:

  1. Start a chat: Open your website or test environment and initiate a normal GUURU chat through the chat button. Make sure the conversation is successfully created.
  2. Complete a purchase: After starting the chat, proceed with a purchase on your website and complete the checkout process until you reach the order confirmation (checkout completed) page or reach any other url configured as described in the Automatic conversions section.

To verify that the conversion was successfully recorded, go to the Interactions screen and check whether a green conversion label is displayed under the conversation or reach the Reporting: Conversion view.

← Handling EventsCookies →
  • Automatic conversions
    • Example
  • Adding value to conversions
  • Manually triggered conversions
  • Shopify Integration
  • Testing Conversions setup
GUURU for Developers
Docs
SmartChatSmartFormAPI Reference
Community
GitLabFacebookLinkedIn
Copyright © 2026 GUURU Solutions Ltd.