Set up Flowsery Analytics in a Lovable website
Lovable is an AI-powered website builder that generates sites from prompts. Since you do not write code directly, you will ask Lovable's AI to embed the Flowsery Analytics tracking snippet for you.
Step 1: Gather your Flowsery Analytics details
Before prompting Lovable, open your Flowsery Analytics website settings and copy your Website ID (e.g., "flid_**") and domain (e.g., "your_domain.com").
Everything you need is in the tracking snippet, which looks like this:
<script
defer
data-fl-website-id="flid_******"
data-domain="your_domain.com"
src="https://analytics.flowsery.com/js/script.js"
></script>
Step 2: Paste this prompt into Lovable's chat
Copy the template below, substitute the two placeholders with your actual Website ID and domain, then send it to Lovable:
Please add Flowsery Analytics tracking to my website. I need this script to load on every page of the website.
**If using raw HTML:**
Add this script tag to the <head> section of every page:
<script
defer
data-fl-website-id="flid_******"
data-domain="your_domain.com"
src="https://analytics.flowsery.com/js/script.js"
></script>
**If using React, Next.js, or similar frameworks:**
Add the appropriate script component to load on every page. For example:
- Next.js: Use the Script component from 'next/script' in the root layout
- React: Add the script to the index.html or use useEffect to load it dynamically
- Vite: Add to the index.html in the public folder
Please use the method that's appropriate for the framework you're building my website with, and confirm what approach you used and that the tracking will work on all pages.
Step 3: Confirm the setup
Once Lovable confirms the changes:
- Publish your website -- Use Lovable's publish button (top-right corner)
- Browse your live site -- After publishing, open the actual URL
- Check the dashboard -- Open your Flowsery Analytics dashboard and look for incoming pageviews (may take a few minutes)
For additional options such as localhost tracking, custom API endpoints, or cross-domain configuration, refer to the script configuration reference.
Troubleshooting
If you are not seeing analytics data:
Ask Lovable to double-check:
Can you please verify that the Flowsery Analytics tracking script is properly installed and will load on all pages?
Please confirm:
1. What framework are you using for my website?
2. How did you implement the Flowsery Analytics tracking?
3. Can you show me where you added the script?
4. Will it load on every page, including future pages I create?
The tracking should load this script: https://analytics.flowsery.com/js/script.js
With my website ID: flid_****** and domain: your_domain.com
If something looks wrong, please fix it using the correct method for the framework you're using.
Common issues:
- Script only added to the homepage rather than globally
- Incorrect or missing Website ID / domain
- Implementation does not match the framework in use
- Framework-specific components not used (e.g., raw HTML in a React app instead of the proper component)
- Website not yet published