Capture · Installation

JavaScript

The JavaScript tracking snippet needs a library to be included on every HTML page. The code should be added near the top of the <head> tag and before any other script or CSS tags. Include the snippet with this code:

/* Onesecondbefore Capture Start */
!function(){"use strict";var e,t,n,s,c;e=window,t=document,n="osb",e.$OSB_QUEUENAME=n,
e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},s=t.createElement("script"),
c=t.getElementsByTagName("script")[0],s.async=1,
s.src="https://storage.googleapis.com/onesecondbefore/js/osb.min.js",
c.parentNode.insertBefore(s,c)}();
/* Onesecondbefore Capture Finish */

// Commands follow...

After the inclusion you can place statements to call the command queue.

Get the latest version

The latest version is 5.1. It was last updated in April 2020.

Download the latest version here

Customization

You can replace the following two values in the library code:

  • https://storage.googleapis.com/onesecondbefore/js/osb.min.js = location of the tracking library.
  • osb = Global name of the command queue. Rename this method if you want to give the function a different name.

iOS

Prerequisites

  • Deployment Target iOS 9.0 or later.
  • Xcode 10.1 and iOS SDK 12 or later.
  • iPhone, iPad or iPod touch.

Integration via CocoaPods

The OSB SDK can be integrated via CocoaPods.

target '[Your Target Name]' do
pod 'OSB'
end

Import the SDK

Use import OSB. We don't require any additional bridging header to use this pod file.

Authenticate app

Before calling any additional feature of the OSB SDK, we are required to set up the SDK with our Affiliate (Access) Key:

func create(accountId: String, siteId: String?, domain: String?, url: String)

This allows the user to integrate the client side application to the SDK. The account Id, siteId, domain we need to get it from the accessed backend . url is server url to send response.

Android

TBD

React Native

TBD

This website uses cookies to ensure you get the best personal experience.