Install Salexor on your Website

Regular Websites

Below is the Salexor tag for this account. Copy and paste it in the code of every page on your website, immediately before the </body> element.

<script type="text/javascript">
  var myo_pigv = { dealership_id: "REF-1" };
  var myo_sc = document.createElement("script");
  myo_sc.type = "application/javascript";
  myo_sc.async = true;
  myo_sc.src = "https://dev.salexor.com/cs/behaviour.js";
  document.body.appendChild(myo_sc);
</script>

Single Page Apps

If your website is a single page app use the following snippet instead.

<script type="text/javascript">
  var myo_pigv = { dealership_id: "REF-1" };
  var myo_sc = document.createElement("script");
  myo_sc.type = "application/javascript";
  myo_sc.async = true;
  myo_sc.src = "https://dev.salexor.com/cs/behaviour.spa.js";
  document.body.appendChild(myo_sc);
</script>

Then on every new page view you need to emit an event to notify the script. See the example below.

window.dispatchEvent(new CustomEvent("_pi_rts_page_loaded"));

If you want to register a native profile use the following code.

window.dispatchEvent(new CustomEvent("_pi_rts_natively_converted"));

Last updated