Quick Start
This content is for v0.2.1. Switch to the latest version for up-to-date documentation.
Set Matomo runtime configuration, then copy the example from a v0.2.1 checkout or release archive:
export MATOMO_URL=https://matomo.example.comexport MATOMO_TOKEN_AUTH=replace-with-your-api-tokenexport MATOMO_SITE_ID=1export MATOMO_CONTAINER_ID=replace-with-your-container-id
cp examples/matomo-conversion/agoraform.yaml agoraform.yamlThe target container must already contain a Matomo Configuration variable. v0.2 does not manage MatomoConfiguration variables declaratively.
apiVersion: agoraform.io/v1alpha1providers: matomo: publish: true environment: liveresources: - address: matomo.variable.user_id attributes: type: dataLayer key: userId name: Trial user ID
- address: matomo.trigger.trial_started attributes: type: customEvent event: trialStarted name: Trial started
- address: matomo.tag.trial_started attributes: type: matomoAnalytics name: Track trial started trigger: $ref: matomo.trigger.trial_started eventCategory: trial eventAction: started eventName: $ref: matomo.variable.user_idagoraform validateagoraform planagoraform applyagoraform planWith publication enabled, the plan makes potential container publication visible before mutation. apply performs draft resource changes in dependency order and only then creates and publishes a container version when the converged draft still differs from the published environment. Repeated unchanged apply must not create duplicate container versions.
Application event after window._mtm is initialized:
window._mtm.push({ event: "trialStarted", userId: "..."});See the tagged conversion example.