Skip to content

Conversation

@arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Nov 6, 2025

Description

Add Google Tag Manager usage.
Now, instead of passing posthog api key and api host variables, we provide the GTM id, so we can load the snippet.
The snippet includes the required posthog configuration.

The major reason to use GTM over simple posthog values is that it gives us more flexibility to change any posthog configuration dynamically, without the need of changing the code and releasing a new version.

For example, we could use different posthog instances, depending on the domain where trento is running, or other additional things.

The next step would be to see how we supply this value during compile time. Maybe having an .env file with a environment variable that sets the value on prod is enough.
This way, we don't need to commit the GTM key on git.

We will need to write an ADR once the feature is in a more advanced stage.

How was this tested?

Unit tests and manual tests with @jagabomb

@arbulu89 arbulu89 requested a review from jagabomb November 6, 2025 13:40
@arbulu89 arbulu89 added the enhancement New feature or request label Nov 6, 2025
Copy link
Contributor

@jagabomb jagabomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM... 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants