Hash-based routing

Panelbear automatically collects the clean URL for every pageview, excluding the query parameters and the fragment part. That means that example.com/accounts?userId=123#signup is transformed into example.com/accounts.

However, some single-page applications and services such as Carrd might rely on the URL fragment for navigation (sometimes also called hash-based routing or hash style URLs). This leads to incomplete URLs in your analytics dashboard (eg. both /#faq and /#about are reported as /).

To fix this, you can tell Panelbear to collect the fragment part of the URL by enabling the setting includeURLFragment: true in the script configuration for your site. By default, it is set to false if left unspecified.

For example, the following configuration tells the Panelbear script to report the URL including the fragment part (eg. /accounts#signup and not just /accounts):

panelbear('config', { includeURLFragment: true });

Please note that this setting does not affect previously collected pageviews. Likewise, if you disable it again in the future it won't clean up pageviews for which the URL fragment was collected.