Before starting, create a new project in Atatus. When you create one, you will see your API Key and a small snippet of code, which you have to copy into the head tag of every HTML page. Please make sure that you add it before other script tags are added. You can also find the same snippet inside the project settings as well.
You can also install browser agent from package managers such as YARN and NPM.
With NPM
Install atatus-spa from the npm registry:
copynpm install --save atatus-spa
Import and initialize atatus to monitor your application:
copyimport * as atatus from 'atatus-spa'; atatus.config('YOUR_API_KEY').install();
For more advanced options on installing your monitoring code, view customizing agent.
Test Integration
To verify that your integration is working, call notify() in your application:
atatus.notify(new Error('Test Atatus Setup'));
An error will appear in your project dashboard.
With YARN
Install atatus-spa from the npm registry:
copyyarn add atatus-spa
Import and initialize atatus to monitor your application
copyimport * as atatus from 'atatus-spa'; atatus.config('YOUR_API_KEY').install();
For more advanced options on installing your monitoring code, view customizing agent.
Test Integration
To verify that your integration is working, call notify() in your application:
atatus.notify(new Error('Test Atatus Setup'));
An error will appear in your project dashboard.
With CDN
Copy & paste this code into the <head>
tag of your html (every page) to start using Atatus on your site. Please make sure that you add it before other script tags as well.
<script src="//dmc1acwvwny3.cloudfront.net/atatus-spa.js"></script>
<script type="text/javascript">atatus.config('YOUR_API_KEY').install();</script>
Replace the YOUR_API_KEY
string with the API Key that is assigned for your project. You're done.
For more advanced options on installing your monitoring code, view customizing agent.
Test Integration
To verify that your integration is working, call notify() in your application:
atatus.notify(new Error('Test Atatus Setup'));
Within few seconds, performance metrics and errors will appear in your project dashboard.