org.analytics ============= .. py:module:: org.analytics Classes ------- .. autoapisummary:: org.analytics.Plausible org.analytics.Matomo org.analytics.SiteimproveAnalytics Module Contents --------------- .. py:class:: Plausible(**configuration: Any) Bases: :py:obj:`onegov.core.analytics.AnalyticsProvider` Base class and registry for analytics providers. .. py:attribute:: template .. py:property:: display_name :type: str .. py:method:: url(request: onegov.org.request.OrgRequest) -> str .. py:property:: script_src :type: str .. py:method:: domain(request: onegov.org.request.OrgRequest) -> str .. py:method:: configure(*, script_src: str | None = None, title: str | None = None, **kwargs: Any) -> Self | None :classmethod: This function gets called with the per-provider configuration defined in onegov.yml. Analytics providers may optionally access these values. The return value is either a provider instance, or ``None`` if the provider is not available. .. py:method:: template_variables(request: onegov.org.request.OrgRequest) -> onegov.core.types.RenderData Returns the necessary variables for formatting the template or ``None`` if the analytics can't be rendered. .. py:class:: Matomo(**configuration: Any) Bases: :py:obj:`onegov.core.analytics.AnalyticsProvider` Base class and registry for analytics providers. .. py:attribute:: template .. py:property:: display_name :type: str .. py:method:: url(request: onegov.org.request.OrgRequest) -> str .. py:method:: configure(*, matomo_url: str | None = None, title: str | None = None, **kwargs: Any) -> Self | None :classmethod: This function gets called with the per-provider configuration defined in onegov.yml. Analytics providers may optionally access these values. The return value is either a provider instance, or ``None`` if the provider is not available. .. py:method:: template_variables(request: onegov.org.request.OrgRequest) -> onegov.core.types.RenderData | None Returns the necessary variables for formatting the template or ``None`` if the analytics can't be rendered. .. py:class:: SiteimproveAnalytics(**configuration: Any) Bases: :py:obj:`onegov.core.analytics.AnalyticsProvider` Base class and registry for analytics providers. .. py:attribute:: template .. py:method:: url(request: onegov.org.request.OrgRequest) -> str .. py:method:: template_variables(request: onegov.org.request.OrgRequest) -> onegov.core.types.RenderData | None Returns the necessary variables for formatting the template or ``None`` if the analytics can't be rendered.