Web URL based

Apxor Web SDK Integration

Check here the latest release notes.

To add Apxor SDK into your Website, add the following scripts to your html files

<script type="text/javascript" defer src="https://unpkg.com/apxor@latest"></script>
<script
  type="text/javascript"
  defer
  src="https://unpkg.com/apxor-qe@latest"
> 
</script>

<script
  type="text/javascript"
  defer
  src="https://unpkg.com/apxor-rtm@latest"
>
</script>

SDK Initialization

To initialize Apxor add the below script

<script>
 
  const _d = new Date();
  (function (a, p, x, o, r) {
    Apxor = a.Apxor || { _q: [], _st: _d };
    [
      "init",
      "setUserId",
      "setUserProperties",
      "setSessionProperties",
      "logPageView",
      "logEvent",
      "logClientEvent",
      "setAppVersion",
      "getClientId",
      "getSessionId",
      "startNewSession",
      "endSession",
      "flattenJSON",
      "setRedirectionHandler",
    ].forEach(function (m) {
      Apxor[m] = function () {
        this._q.push({ m: m, args: arguments });
      };
    });
   })(window, document, "script");
 
 
    Apxor.init(
      "YOUR_SITE_ID",
      {
        idle_time_out: 1800,
        plugins: ["ApxorRTM"],
      },
      
      function success(data) {
        console.log("APXOR SDK Initialized");
      },
      function error() {
        console.log("APXOR SDK not initialized");
      });
   
</script>

You can find the description and default values for Initialization options here

Note:

Contact support@apxor.com to get your unique SITE_ID

Additional features API Guide

Click here for guides to log user properties, events and event properties.

Last updated