We’ve made it easy to manually control when tracking begins, so your visitors’ data is only collected after they give consent.
You’ll want to use this method if:
You built your own cookie banner or popup
You’re using a third-party consent tool that’s not in our supported list (like Cookiebot, Complianz, etc.)
You want full control over how and when Pathmetrics starts tracking visitors
To start tracking after a visitor accepts analytics cookies, a developer just needs to call one line of code:
window.pathmetrics.enable();
You can place this line in your cookie banner script, right after the visitor agrees to analytics tracking.
This function activates Pathmetrics and allows it to:
Start tracking the visitor’s journey (source, pages, time spent)
Track the session only after consent is given
Respect privacy laws like GDPR
Until this function is called, Pathmetrics won’t track anything
If you have a custom "Accept" button for analytics cookies, you can add something like this:
document.getElementById('accept-analytics').addEventListener('click', function () {
// Your logic to save consent
// Start Pathmetrics tracking
window.pathmetrics.enable();
});
Replace accept-analytics
with the actual ID or class you use in your button.
Open your site in a private/incognito browser window.
Click "Accept" on your cookie banner
Browse a few pages, then submit a form
Go to your newly saved entry in your form builder
Look at the Pathmetrics section to view the tracked path
If nothing shows up, make sure:
The consent function was called after the user agreed
The form plugin you’re using is one we support