Script installation

After you add your site you will get a small script snippet that looks like the following:

<script defer data-site="YOUR_SITE_ID" src="https://cdn.lightweightanalytics.com/script.js"></script>

Simply paste the snippet you get right before the closing </head> tag on your website you want to track:

The system will automatically populate YOUR_SITE_ID with the identifier shown in the dashboard. That’s all – visitors will start appearing in real-time within a couple of seconds.

Script Installation Example An example script installed on my personal site

There are some advanced options that can be changed anytime in your site settings:

<script defer
        data-site="YOUR_SITE_ID"
        data-c_mode="true"          <!-- set to false for cookieless mode -->
        data-l_ping="false"              <!-- live-visitor ping interval in seconds -->
        src="https://cdn.lightweightanalytics.com/script.js"></script>
  • data-c_mode – "false" (default) stores a first-party cookie for accurate unique-visitor counts; "false" disables all cookies.
  • data-l_ping – send automatic heart-beat pings while the page stays open. Useful for live dashboards and average time-on-page metrics.

These settings are set in your site and shown in your script for transparency. You don't have to worry about modifying them, they'll be set based on your site settings.