Set up Flowsery Analytics in a Replit project

Replit supports many frameworks and ships with an AI assistant that can modify your code. You can use Replit Agent to embed Flowsery Analytics tracking in your web application.

Step 1: Find your tracking credentials

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

These values appear in your 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: Ask Replit Agent to add tracking

Open Replit Agent (the AI assistant) and send this prompt:

Help me integrate Flowsery Analytics into my web project. I need this tracking script added to work across my entire application:

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

Implementation based on my project type:
- HTML/CSS/JS projects: Add to the <head> section of index.html and all pages
- React projects: Use proper Script component in the main layout
- Next.js projects: Add Script component to _app.js or layout
- Express/Node.js: Include in your template engine or static HTML files
- Python Flask/Django: Add to base template head section

Requirements:
- Script must load on every page/route
- Preserve the defer attribute
- Use the exact source URL: https://analytics.flowsery.com/js/script.js

Please implement this and show me exactly what changes you made to which files.

Step 3: Test your implementation

After Replit Agent applies the changes:

  1. Run your project -- Hit Replit's run button to start the application
  2. Open the preview -- View the app in Replit's webview or open the public URL
  3. Check analytics -- Watch your Flowsery Analytics dashboard for visitor data

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

Troubleshooting with Replit Agent

If tracking is not working:

The Flowsery Analytics tracking doesn't seem to be working. Can you help debug this?

Please verify:
1. What type of project am I running? (React, HTML, Next.js, etc.)
2. Which files did you modify to add the analytics?
3. Is the script loading in the browser's developer tools?
4. Will it track visitors on all pages of my site?

The analytics should connect to: https://analytics.flowsery.com/js/script.js
With my website ID: flid_******

Please fix any implementation issues you find.

Common issues:

  • Script only added to one page rather than globally
  • Wrong file modified for the project's framework
  • Tracking not active in Replit's development preview
  • Project not publicly accessible for testing