Skip to content

Ability to add an analytics tracking code to Signalen frontend #173

@bartjkdp

Description

@bartjkdp

We would like municipalities to be able to add a tracking code for their analytics solution, so they are able to track pageviews on Signalen.

Possible solution design

Add the ability to mount an additional file in the container (e.g. /extend_body.html). This contents of this file is added to the HTML body in index.html during runtime via start.sh.

The contents of this HTML can then be controlled via a value in the Helm chart:

htmlBodyExtend: |
    <script async src="https://siteimproveanalytics.com/js/siteanalyze_000000.js"></script>

The content of the value can be added to a ConfigMap and mounted on /extend_body.html in the container.

Considerations

  • We could also consider using the existing configuration JSON, but formatting HTML in a JSON value can be challenging.
  • We can consider moving to YAML for the app configuration, then adding HTML as a value can become easier as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussThings we want to discuss with the whole team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions