Configuration
All available configuration options for the Pipetrace tracking script.
Configure the tracking script using data-* attributes on the script tag. All options except data-site are optional.
Full Configuration Example
html
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://api.pipetrace.andginja.com"
data-hash="false"
data-outbound="true"
data-downloads="true"
data-scroll="true"
data-errors="true"
data-forms="true"
src="https://api.pipetrace.andginja.com/t.js">
</script>All Configuration Options
| Attribute | Type | Default | Description |
|---|---|---|---|
data-site | string | — | Your unique site tracking ID from the Pipetrace dashboard. |
data-api | string | https://api.pipetrace.andginja.com | Custom API endpoint URL for self-hosted installations. |
data-hash | "true" | false | Enable tracking for hash-based routing (e.g., /#/page). |
data-outbound | "false" | true | Disable automatic outbound link click tracking. |
data-downloads | "false" | true | Disable automatic file download tracking. |
data-scroll | "false" | true | Disable scroll depth milestone tracking. |
data-errors | "false" | true | Disable JavaScript error tracking. |
data-forms | "false" | true | Disable form interaction tracking. |
Minimal Setup
For most sites, you only need the site ID:
html
<script defer data-site="YOUR_SITE_ID" src="https://api.pipetrace.andginja.com/t.js"></script>Disabling Features
To disable automatic tracking of certain features, set the attribute to "false":
html
<!-- Disable outbound link and download tracking -->
<script
defer
data-site="YOUR_SITE_ID"
data-outbound="false"
data-downloads="false"
src="https://api.pipetrace.andginja.com/t.js">
</script>Self-Hosted Installation
If you're running a self-hosted Pipetrace instance, point to your own API:
html
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://analytics.yourdomain.com"
src="https://analytics.yourdomain.com/t.js">
</script>Hash-Based Routing
For apps using hash-based URLs (e.g., example.com/#/page):
html
<script
defer
data-site="YOUR_SITE_ID"
data-hash="true"
src="https://api.pipetrace.andginja.com/t.js">
</script>With hash mode enabled, navigation like /#/page1 to /#/page2 will be tracked as separate page views.
Privacy Considerations
The script automatically respects privacy settings:
- Do Not Track: Visitors with DNT enabled are not tracked
- Global Privacy Control: GPC signals are automatically respected
- No Cookies: All tracking is cookieless by default
- Bot Filtering: Automated traffic is automatically excluded