Quick Start
This walkthrough uses Agoraform v0.3.0. Choose the provider you can reach, then run the same four commands.
validate -> plan -> apply -> planReview the first plan before applying. The final plan should report No changes. when desired configuration, local state, and remote state are unchanged.
Option A: Google Ads conversion measurement
Section titled “Option A: Google Ads conversion measurement”The primary v0.3 example manages a website Trial Started conversion:
googleads.conversion_action.trial_startedas aSIGNUPwebsite conversiongoogleads.customer_conversion_goal.signupsoSIGNUP/WEBSITEis biddable as an account-default optimization goal- a logical
$refso the conversion action exists before goal reconciliation
Agoraform manages Google Ads configuration only. Website tags, Google Tag Manager, and application event emission stay outside the provider. After apply, use the conversion ID and conversion label from Google Ads when configuring those external tools.
Complete Google Ads setup first. Then, for an interactive Bash session, read -s avoids placing typed secrets in shell command history:
export GOOGLE_ADS_CLIENT_ID=replace-with-your-oauth-client-idexport GOOGLE_ADS_CUSTOMER_ID=1234567890
read -rsp "Google Ads developer token: " GOOGLE_ADS_DEVELOPER_TOKEN; echoexport GOOGLE_ADS_DEVELOPER_TOKENread -rsp "Google Ads OAuth client secret: " GOOGLE_ADS_CLIENT_SECRET; echoexport GOOGLE_ADS_CLIENT_SECRETread -rsp "Google Ads refresh token: " GOOGLE_ADS_REFRESH_TOKEN; echoexport GOOGLE_ADS_REFRESH_TOKENDo not substitute literal secret values into those prompt commands. On automated systems, inject the GOOGLE_ADS_* secrets from your secret manager. You can also store them in .agoraform.env.
Copy the included example from a v0.3.0 checkout or release archive:
cp examples/googleads-conversion/agoraform.yaml agoraform.yamlapiVersion: agoraform.io/v1alpha1providers: googleads: {}resources: - address: googleads.conversion_action.trial_started attributes: name: Trial Started category: SIGNUP value: 0 count: ONE primaryForGoal: true
- address: googleads.customer_conversion_goal.signup attributes: category: SIGNUP origin: WEBSITE biddable: true conversionAction: $ref: googleads.conversion_action.trial_startedThen:
agoraform validateagoraform planagoraform applyagoraform planThe conversion action is created. The customer conversion goal is created by Google Ads; Agoraform adopts or updates it and never attempts unsupported create or delete operations.
See the tagged Google Ads conversion example for Google Ads verification, conversion identifiers for website tags, and import of equivalent manually configured conversion measurement.
Option B: Matomo conversion tracking
Section titled “Option B: Matomo conversion tracking”The primary v0.2 example, still valid in v0.3.0, manages a complete trialStarted conversion flow:
- a Data Layer variable that reads
userId - a Custom Event trigger for
trialStarted - a Matomo Analytics event tag
- logical references that force the variable and trigger to exist before the tag
- declarative publication to a Matomo Tag Manager environment
The target container must already contain a Matomo Configuration variable. v0.3.0 does not manage MatomoConfiguration variables declaratively.
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.yamlapiVersion: 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 the 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.
After the Matomo Tag Manager container snippet has initialized window._mtm, the application emits:
window._mtm.push({ event: "trialStarted", userId: "..."});Use a stable, non-secret, non-email identifier for userId.
Default manifest path
Section titled “Default manifest path”Commands read agoraform.yaml in the current directory unless you pass -f / --file or a positional path:
agoraform validateagoraform validate -f path/to/manifest.yamlagoraform validate path/to/manifest.yamlSpecify a manifest as an argument or with --file, not both.