Install Talvess with Angular
Track your Angular app with a script in the application's index.html.
Register your website
Sign in and add your website. Register its exact origin, including the protocol, hostname, and any port. Copy the script URL and website ID from your generated setup snippet.
Add the script
Add the script inside the head of your application's src/index.html. If your workspace uses a custom index path, edit that file instead.
Replace YOUR_TALVESS_DOMAIN and YOUR_WEBSITE_ID with the values from setup. Add the highlighted lines to your existing file.
Keep the base element and your existing application root. There is no need to add the tracker to a component or an Angular module.
See the Angular application file documentation for the framework's configuration details.
Verify installation
- Publish your changes and open your website in a browser.
- In Talvess, open your website menu, choose Check installation, then Run checks.
- Open Analytics and select a date range that includes your visit.
The tracker records the first pageview and follows pathname changes in single-page applications. Do not add a separate pageview call for route changes. Query-string and hash-only changes do not count as pageviews.
If your site uses Content Security Policy, allow your Talvess origin in script-src and connect-src. If visits do not arrive, follow the troubleshooting guide. Read what is collected for browser storage and privacy details.