Wishi partner widget/SDK documentation
  • The Formal Stuff
    • Introduction
    • iOS SDK
      • Setup
        • View controller setup example
      • Public protocols
      • Public API's
      • Data structures/types
    • Web SDK
      • Setup
      • Initialization
      • Data structures
      • Public API's/interfaces
      • Events subscription
      • Telemetry
    • Pixel
      • Set up the base code
      • Set up events
      • Tracking parameters
    • Client-side authentication
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. The Formal Stuff
  2. Pixel

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.

PreviousPixelNextSet up events

Last updated 1 year ago

Was this helpful?