Set up Flowsery Analytics in a Vercel v0 project

Vercel v0 generates React components and apps through AI conversation. To add analytics, you will ask v0 to wire the Flowsery Analytics snippet into your component tree.

Step 1: Gather your tracking details

Open your Flowsery Analytics website settings and locate your Website ID (e.g., "flid_**") and domain (e.g., "your_domain.com").

These values come from the tracking snippet:

<script
    defer
    data-fl-website-id="flid_******"
    data-domain="your_domain.com"
    src="https://analytics.flowsery.com/js/script.js"
></script>

Step 2: Send this prompt to v0

Fill in your details and send the following to Vercel v0:

Please add Flowsery Analytics tracking to my application. I need this script integrated so it tracks all page views and user interactions.

Here's the tracking script to implement:

<script
  defer
  data-fl-website-id="flid_******"
  data-domain="your_domain.com"
  src="https://analytics.flowsery.com/js/script.js"
></script>

For React components:
- Add this using Next.js Script component in the layout or root component
- Make sure it loads in the document head
- Ensure tracking works across all routes and components
- Keep the defer attribute for performance optimization

Please show me where you've added the analytics code and confirm it will track user activity throughout the entire application.

Step 3: Verify the integration

Once v0 updates your project:

  1. Review the code -- Confirm v0 added the Script component correctly
  2. Deploy your app -- Use Vercel's deployment from v0 or export the code
  3. Check analytics -- Visit the live site and watch your Flowsery Analytics dashboard

For additional options such as localhost tracking, custom API endpoints, or cross-domain configuration, refer to the script configuration reference.

Debugging issues

If analytics are not showing up:

I need to verify the Flowsery Analytics setup. Can you check:

1. Did you add the Script component to the root layout?
2. Is the script loading in the browser's network tab?
3. Does tracking work on all pages/routes?
4. Can you show the exact implementation?

Analytics should load from: https://analytics.flowsery.com/js/script.js
With website ID: flid_******

Please fix any issues with the tracking implementation.

Typical issues:

  • Script component not imported from 'next/script'
  • Tracking only active on specific components
  • Incorrect Website ID or domain values
  • Latest changes not yet deployed