Skip to content

Analytics developer documentation

Developer documentation for the Analytics module. To install and configure it, see the README.

  • Writing an analytics service plugin: the plugin attribute and base class, output, configuration schema and Content Security Policy.
  • Working with the data layer: adding data layer values from code, choosing which pages are tracked, and data layers in your own plugins.
  • Hooks: the hooks other modules can implement, generated from analytics.api.php.
  • API reference: the module's classes, generated from the code.