Follow the steps below to install the Universal VisiSmart Code to your Astro website.
1. Log in to your Visiopt account.
2. Go to Settings → Manage Your Domain from the top navigation menu.
3.Click Add New Domain.
4. Fill in the required information:
• Website Name - Enter a name for your website.
• Website URL - Enter the full URL of your website (e.g., https://yourwebsite.com).
• Frontend Framework - Select "Astro" from the dropdown list.
Then click Save to proceed.
5. After saving the domain, Visiopt will generate a unique Universal Smart Code for your website.
Copy this code - you'll need it in the next step.
6. Open your Astro project in your preferred code editor.
7. Open the astro.config.mjs file (or astro.config.ts if your project uses TypeScript).
8. Add the Visiopt integration inside the defineConfig() function as shown in the installation example.
This will automatically inject the Smart Code into every page of your Astro website.
9. For better loading performance, add the two recommended <link> tags provided by Visiopt inside your layout or header file where the <head> section is defined.
Important: Place these <link> tags before the closing </head> tag.
10. Save all your changes. Build and deploy your Astro website.
Once your website is live, Visiopt will begin tracking visitors using the installed Universal Smart Code.
Comments
0 comments
Please sign in to leave a comment.