Integration into Vue.js (Vite or CLI) is very simple. Since bchic automatically detects modern History API events, you don’t need to configure anything extra for tracking page changes (via Vue Router).Documentation Index
Fetch the complete documentation index at: https://docs.bchic.de/llms.txt
Use this file to discover all available pages before exploring further.
Prepare Tracking Script
Copy your script from the bchic settings. It should include your
data-website-id.Insert into index.html
Search for the
index.html file in your project folder (in Vite projects, this is usually directly in the root directory or under /public).Insert the script into the <head> area:index.html
Custom Events (TypeScript-safe)
If you callwindow.bchic directly in the code, you often get TypeScript or ESLint errors (“Property ‘bchic’ does not exist on type ‘Window’”).
We therefore recommend the following best practice approach with a type definition and a composable.
1. Create Type Definition
Create a filesrc/bchic.d.ts so TypeScript knows the bchic object.
src/bchic.d.ts
2. Create Composable (Optional but recommended)
To make access even easier, create a composable undersrc/composables/useTracking.ts:
src/composables/useTracking.ts
3. Usage in Components
Now you can use tracking cleanly in every component:src/components/SignupButton.vue

