Add Bisko to your site

Bisko is a data management platform by GjirafaTech that collects, manages, and provides insights on a vast amount of data from multiple sources. Bisko Web SDK is a JavaScript library and API that allows you to send event data to Bisko. This page describes how to use Bisko Web SDK to configure a site for collecting events.

Setup

To install the SDK, copy the following code and paste it immediately after the <head> tag on every page of your site.

Replace BISKO_ORGANIZATION_CODE with the code of the Bisko organization and BISKO_PROPERTY_ID with the ID of the Bisko property to which you want to send data.

You need only one global snippet per page.

  <!-- GjirafaTech Bisko Code -->
<script async src="https://bisko.gjirafa.net/web/{BISKO_ORGANIZATION_CODE}-sdk.js"></script>
<script>
  window.biskoQueue = window.biskoQueue || [];
  function bsk(){biskoQueue.push(arguments);}
  bsk('init', 'BISKO_PROPERTY_ID');
  bsk('event', 'pageview')
</script>
<!-- End GjirafaTech Bisko Code -->

This snippet loads the Bisko Web SDK, establishes BISKO_PROPERTY_ID as the default Bisko property ID, and sends a pageview event to Bisko.

User identification

By default, Bisko assigns all users a unique ID which is used to track the user across multiple pages and events which are sent. If you want to explicitly identify the user across multiple browsers or devices, you can use your own identifies within Bisko. This is useful if your site has register/login functionallity for users, which means you have your own user IDs for those that are logged it. To use your own ID with Bisko, you can send it as an additional argument in Bisko init method.

Replace BISKO_ORGANIZATION_CODE with the code of the Bisko organization and BISKO_PROPERTY_ID with the ID of the Bisko property to which you want to send data.

Replace USER_ID_HERE with your own user id which you want to send to Bisko.

  <!-- GjirafaTech Bisko Code -->
<script async src="https://bisko.gjirafa.net/web/{BISKO_ORGANIZATION_CODE}-sdk.js"></script>
<script>
  window.biskoQueue = window.biskoQueue || [];
  function bsk(){biskoQueue.push(arguments);}
  bsk('init', 'BISKO_PROPERTY_ID', 'USER_ID_HERE');
  bsk('event', 'pageview')
</script>
<!-- End GjirafaTech Bisko Code -->

Additionally you can send extra data which can be used to identify a user within different sites. For example, you can send additional IDs, or other user properties such as gender, age, group etc.

Example code snippet:

  <!-- GjirafaTech Bisko Code -->
<script async src="https://bisko.gjirafa.net/web/{BISKO_ORGANIZATION_CODE}-sdk.js"></script>
<script>
  window.biskoQueue = window.biskoQueue || [];
  function bsk(){biskoQueue.push(arguments);}
  bsk('init', 'BISKO_PROPERTY_ID', 'USER_ID_HERE', { 'gender': 'male', 'age': '25', 'group': 'A' });
  bsk('event', 'pageview')
</script>
<!-- End GjirafaTech Bisko Code -->

As seen from the samples above the init() function expects three parameters:

PARAMETER

DATATYPE

REQUIRED

DESCRIPTION

propertyId

INTEGER

TRUE

The identification number of you property created within your organization.

userId

STRING

FALSE

The user identifier within your website.

userProperties

OBJECT

FALSE

Extra user properties that you want to be added to the collected data.

User consent

  <!-- GjirafaTech Bisko Code -->
<script async src="./script.js"></script>
<script>
  window.biskoQueue = window.biskoQueue || [];
  function bsk(){biskoQueue.push(arguments);}
  bsk('init', 'BISKO_PROPERTY_ID');

  //This is used specifically for user consent.
  //Organization Alias List is a list of organizations alias.
  bsk('consent', ['ORGANIZATIONS', 'ALIAS', 'LIST'])

  bsk('event', 'pageview')
</script>
<!-- End GjirafaTech Bisko Code -->

Event collection

Standard events are predefined user actions that correspond to common activities, such as reading an article, viewing a product, or watching a video. All standard events are tracked by calling the SDK's bsk('event') function, with the event name. For example, here's an event which tracks a page view:

  bsk('event', 'pageview');

Since the event name is a string, you can send any text that covers your needs:

  bsk('event', 'pageview');
bsk('event', 'search');
bsk('event', 'view');
bsk('event', 'read');
The SDK's init method must already be called on every page where you want to track events.