Set up the base code

Set up the pixel base code on your website

  1. Copy the following pixel base code

<script>
      !((w, d, t, u, wp, q, s, fs) => {
          if (w.wishiPixel) return;
          wp = w.wishiPixel = (eventName, props) => {
              q = wp.queue || [];
              wp.queue = q.push({
                  eventName,
                  props
              }) && q;
          }
          s = d.createElement(t);
          s.async = !0;
          s.src = u;
          fs = d.getElementsByTagName(t)[0];
          fs.parentNode.insertBefore(s, fs);
      })(
          window,
          document,
          "script",
          "https://d2qcyaj4szdxsa.cloudfront.net/wishi-pixel.<version>.js"
      );
      wishiPixel('init', { partnerKey: <partner-key> });
</script>
  1. Find the header of your website or locate the header template in your CMS or web platform.

  2. Paste the base code at the bottom of the header section, just above the closing head (</head>) tag, on every page of your website.

  3. Replace <version> with the right one for you. There are two options:

    1. Use specific version received from Wishi. For example: https://d2qcyaj4szdxsa.cloudfront.net/wishi-pixel.1.8.8.js

    2. Use stable label to silently get all the latest updates and bug fixes. For example: https://d2qcyaj4szdxsa.cloudfront.net/wishi-pixel.stable.js

  4. Replace <partner-key> with the key you have received from Wishi support team.

Last updated