Quick Start
This content is for v0.1.0. Switch to the latest version for up-to-date documentation.
You need a Matomo site you are allowed to change, plus:
MATOMO_URL Matomo base URL, for example https://matomo.example.comMATOMO_TOKEN_AUTH API tokenMATOMO_SITE_ID numeric site idvalidate, plan, apply, and import call Matomo. They fail without those variables and a reachable instance. Credentials never belong in YAML.
From an extracted release archive or a v0.1.0 checkout:
cp examples/agoraform.yaml agoraform.yamlWindows PowerShell:
Copy-Item .\examples\agoraform.yaml .\agoraform.yamlThe example declares one matomo.goal:
apiVersion: agoraform.io/v1alpha1resources: - address: matomo.goal.trial_started attributes: name: Trial Started matchAttribute: event_action pattern: trialStartedThen:
agoraform validateagoraform plan # expect a create; exit code 2 when changes existagoraform applyagoraform plan # no changes; exit code 0Successful apply writes the Matomo goal id to agoraform.state.json next to the manifest. Do not put tokens in it, and do not commit it unless you have an explicit sharing workflow.
Import an existing goal
Section titled “Import an existing goal”agoraform import matomo.goal.trial_started 12Import prints YAML for configurable fields and records the remote id in local state. It does not rewrite agoraform.yaml and does not change Matomo. Paste the printed resource into the manifest, then agoraform plan should report no changes if the live goal still matches.