To install the Agastya script on your website, you need your API key. You can find this in your admin panel or by getting in touch with us over support. Once you have your API key, make sure that you have added your website in the list of trusted domains, otherwise Agastya will show an unauthorized error in your console.
API_KEY in the line below with your API key and add it before closing the
<script src="https://platform.oswaldlabs.com/_/API_KEY.js" async defer></script>
This loader script will automatically load the most recent, stable version of Agastya on your website, so your users always have the best features and security updates.
|4-beta||2019||https://loader.oswaldlabs.com/API_KEY.js||• Will be redirected|
If you're using a package manager like NPM or Yarn, you can use the following package, but additional configuration is required. Our NPM package has no dependencies and creates a script to load the plugin.
We recommend using Yarn because it caches your packages. You can use the following line to install the
agastya package to your project.
yarn add agastya
Alternately, if you're using the NPM client, you can use the following line instead.
npm install agastya
You need to do additional configuration and initialize the package. Add the following code to your entry file (
If you're using ES6 imports and a bundler like Webpack, you can use the following line to import the package to your project.
import Agastya from "agastya";
Finally, initialize the plugin using the agastya.init function by supplying your API key as the parameter, and Agastya should be reading and working in your project.
const agastya = new Agastya("API_KEY");