Agent Installation
For NPM and YARN
If you want to include Atatus script with your source, you can add it through package managers such as YARN and NPM. Install atatus-spa from the npm or yarn registry:For 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.
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.
Since Ionic framework is built on AngularJS framework, you have to follow Angular integration documentation.
Test Integration
To verify that your integration is working, call notify() in your application:Add atatus to the angular exception handler
Clean file URL in error stack trace
Many mobile applications being written in JavaScript within containers such as Apache Cordova, Ionic, PhoneGap etc.. So you may find that error stack traces contain file paths which are different across platforms and devices. UsingonBeforeErrorSend method, you can rewrite file’s URLs before the error is reported back to Atatus.
This will make the stack traces more easily readable.
Using Source Maps
If you uploaded the source maps for JavaScript files, then you have to append corresponding domain name before the path. Let us say, you have uploaded a source map for a script filehttps://www.acme.com/www/js/app.min.js, then your code should look like
https://www.acme.com/www/js/app.min.js and the corresponding uploaded source map will be fetched and processed.