Support/Installation Guides
Installation Guides

Set up Flowsery Analytics in a Django project

This guide covers adding Flowsery Analytics tracking to your Django application.

Insert the tracking snippet in your base template

The simplest way to load the script on every page is through Django's base template.

  1. Open your base template -- typically at templates/base.html.

  2. Place the Flowsery Analytics snippet inside the <head> block:

HTML
<script defer data-fl-website-id="flid_******" src="https://cdn.flowsery.com/main.js"></script>

Replace flid_****** with the Website ID from your Flowsery Analytics settings.

Alternative: Drive values from Django settings

For a more flexible setup, store the tracking values in settings.py:

  1. Add the following to settings.py:

HTML
FLOWSERY_WEBSITE_ID = 'flid_******'
  • Reference these values in your base template:

  • HTML
    <script
      defer
      data-fl-website-id="{{ settings.FLOWSERY_WEBSITE_ID }}"
      src="https://cdn.flowsery.com/main.js"
    ></script>

    Confirm everything is working

    After deploying either approach:

    • Navigate to your live site
    • Open your Flowsery Analytics dashboard and check for incoming pageviews
    • Allow a couple of minutes for the first data to appear

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