1. Shopbox Data Extraction
  2. Data Extraction

Shopbox Data Extraction

Data Extraction

Shopbox generates several pieces of anonymous data about users, sessions and events. Some of this information can be collected through simple functions by our clients development teams.

Below is the list of information that can be extracted and the associated functions.

Unique User ID:

A unique identifier is generated for each user on the first interaction.

js
function getShopboxUUID() {
  var su = localStorage.getItem("shopbox_uuid");
  if (su) return su;
  var jsb = localStorage.getItem("svelte-app-v0.1.304");
  if (jsb) {
    try {
      var psjb = JSON.parse(jsb);
      if (psjb.uuid) return psjb.uuid;
    } catch (e) {}
  }
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
    var r = (Math.random() * 16) | 0,
      v = c === "x" ? r : (r & 0x3) | 0x8;
    return v.toString(16);
  });
}

Page Load ID:

A unique identifier that is regenerated each time a new page is loaded or on a page reload.

js
window.getShopboxClientPageLoadID();