index.html. The SDK owns script loading for this installation path.
Install Bily
Keep one public configuration value
Add the complete tracking URL to the public environment configuration your Angular build already uses.src/environments/environment.ts
Initialize in the browser
src/app/bily-tracking.service.ts
isPlatformBrowser() keeps initialization out of server rendering.
Start the service once
Inject the service from the root component. Keep the component’s existing imports, template, providers, and application shell.src/app/app.component.ts
PageView calls for those navigations; use track() for business events.
Track successful actions
src/app/save-profile.component.ts
Rebuild after a URL change
Angular environment values are normally compiled into browser assets. After Bily validates a customer subdomain, replace the complete value and rebuild every affected target.Verify Angular tracking
Check server rendering, initial load, successful routes, and action events.
Move to first-party tracking
Replace the URL once, rebuild, deploy, and verify the new request.