Other language

STEP 1

This document explains the different methods to integrate your website with Carts Guru. The idea is to “push” your shopping carts and orders to our retargeting system. This documentation suggests the best models to establish a secured connection.

Use our API to send carts from checkout

Use our API to send orders on confirmation page

STEP 2

To enable Facebook Messenger retargeting feature or other online feature, you should add the following script on your frontend.

This tag will add Facebook Messenger checkbox under you add to cart button if you do not use any widget on https://carts.guru. If you do have widgets to capture your client opt-in we will automatically display it on your website once Facebook Messenger will be used in your retargeting strategy.

The tag must be set on every page but the init will be a little bit different regarding the context of the page. The cart should be define when your visitor has added something in his cart.

As of today, the product and order is not required if you are already using the API logic to send identified carts.

In order to position our widget and to bind them to the proper button, you will have to add the class 'cg-fb-optin' for this specific button.

<script>
  function cgAsyncInit() {
    // INIT
    CG('init');
  }

  (function (d, s, id) {
    if (d.getElementById(id)) return;
    var t = d.getElementsByTagName(s)[0];
    var cgs = d.createElement(s);
    cgs.id = id;
    cgs.src = 'https://t.carts.guru/bundle.js?sid={{SITE_ID}}';
    t.parentNode.insertBefore(cgs, t);
    cgs.onload = cgAsyncInit;
  }(document, 'script', 'cg-bundle'));
</script>

Last updated