Overview

Installing Sprig allows you to monitor your customer's interactions and generate triggers to launch a Sprig Survey or Replay, so you can ask just the right question and capture just the right moments--all at just the right time.

Installing Sprig in your website or web app allows you to send Events and Attributes associated with users as they use your Website or Web App.

Installation Options

To launch a Sprig study on your Website or Web App, you'll need to install one of the following:

More Information

Performance

Performance is a critical part of any successful website, and Sprig ensures you can get deep insights about your users without sacrificing your site’s performance.

Files

The script is loaded asynchronously, so it does not impact website load times or scroll performance.

The Sprig JS SDK is broken up into 2 JS files: a controller and a view.

controller.js: 89kB (28kb gzipped)

The controller is responsible for keeping track of your users and your interface to track events and set attributes and identities. A vast majority of sessions are not shown studies, so we separated the view into a separate file, reducing data usage for your users.

view.js: 171kB (users only download this when a study is presented to them)

The view contains the code to show the study and send the responses to Sprig.

You may notice that our npm package shows a size of ~800kb. This is double of what is mentioned above because it includes both .js and .cjs exports. Sprig JS is intended only for web browser use so the .cjs files won't be included in your bundle and thus will be half of what is mentioned on the npm webpage

Availability and load time

The Sprig client-side script is hosted on a leading global CDN powered by AWS CloudFront. This allows for the fastest load times by hosting the script as close to the users as possible.

Supporter browser versions

The Sprig client-side script is tested against all modern browsers. These are our minimum supported versions:

  • Chrome 87
  • Firefox 78
  • Safari 14
  • Edge 88

📘

As Chrome and Firefox are on 6-week release cycles, best-effort support is given to older releases.

Impact on Page Load

Methodology

We performed an A/B test of the Sprig marketing page (https://sprig.com) with the Sprig SDK Snippet installed and not-installed. We used Lighthouse and configured it to throttle the network to "Slow 4G" and CPU to "4x slowdown". We measured 3 metrics:

  • FCP (First Contentful Paint)
  • LCP (Last Contentful Paint)
  • DCL (DOM Content Loaded)

We ran each variant 20 times and both the average and median values showed no difference