logoNotionDir

Analytics

Learn how to use analytics in NotionDir.

NotionDir support Google Analytics and Plausible Analytics, you can enable it by adding the following code to your src/site-config.ts file:

If none of the configurations are set, NotionDir will simply ignore it and not collect any analytics data.

Google Analytics

{
  analytics: {
    gaId: '', // example: G-1234567890
  },
}

Just replace the '' with your Google Analytics ID, and you are good to go.

Plausible Analytics

{
  analytics: {
    plausibleUrl: {
      domain: '', // example: notiondir.com
      scriptUrl: 'https://plausible.io/js/script.js',
    },
  },
}

Update the domain and scriptUrl with your own, and you are good to go.

On this page