Welcome to our guide to installing Sprig with the Sprig SDK.
Sprig customers have access to in-product studies, which allow you to target studies at specific users directly in your product. Starter plan customers have access to web in-product studies while Enterprise customers have access to both mobile and web in-product studies. In-product studies do require installation, and there are a few ways you can do so, including our native Javascript SDK.
Let’s walk through the installation method for Sprig via our Native Javascript SDK by navigating to the Integrations page in Sprig and selecting installation.
You can install Sprig with an HTML code snippet, which automatically ensures you have the latest version of our SDKs. In addition, you can install Sprig with NPM or YARN.
To install via HTML, add the following JavaScript snippet to your webpage to complete a Sprig JavaScript SDK installation. Add the snippet to every page on your website where you want Sprig to track your users. You can paste the snippet anywhere on the page, but preferably at the bottom of the document, before the </body> tag.
To install via NPM/Yarn, use the following shell command to install the Sprig SDK through NPM or Yarn as part of your web application. Sprig will be bundled with the rest of your front-end application and be immediately accessible on page load.
Keep in mind that with NPM and Yarn, you have to update the Sprig SDK manually to receive the latest functionality. We recommend updating the package frequently for improved functionality and bug fixes.
And there you have it! You’ve officially installed Sprig and are ready to launch targeted in-product studies.