Skip to content
SiteSpect JS Library for React, Angular, and other SPA frameworks.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SiteSpect SPA SDK

SiteSpect JavaScript Library for testing and optimizing React, Angular, and other SPA frameworks.

The SPA SDK is dynamically injected into the HTML page by SiteSpect as one minified script that is less than 5kb gzipped. You can see a live version here. The library is split into 3 smaller libraries:

  • GenericAdapter - Library that uses Mutation Observers to identify when changes should be applied.
  • SSDomVar - Library that evaluates client side variations, triggers, and applies changes.
  • EventTrack - Library that captures client side events and sends data to SiteSpect in order to populate metrics.

In SiteSpect, assignment occurs on the initial request (based on audience/targeting rules) and this is when SiteSpect would inject the SPA SDK and client side variations into the HTML page. Client side variations are instructions, stored as a JavaScript variable, that contain the changes you want to apply in your application. These variations can include triggers which define when/where the changes should take place (example).

The SPA SDK library evaluates and applies client side variations using Mutation Observers. When a change is applied, SiteSpect is automatically notified and the user is counted in the campaign, inserted into reports, and persists in the experience based on campaign settings.

You can’t perform that action at this time.