Find out which emails, ads, and posts bring gifts in. Your forms can send events to Google Analytics and Google Tag Manager, and record the UTM tags from a link on each payment in Vega.
In this article
- Google Analytics and Tag Manager
- Events
- UTM tracking
- Checking it works with debug mode
- For your website team
Google Analytics and Tag Manager
Your organisation's Google Analytics (GA4) measurement ID and Google Tag Manager container ID from the Vega dashboard are used on every form automatically. To use different ones on a form, enter them under Form settings → Analytics.
When the form is on your website
For a form on your website, choose where its events go:
| Option | What happens |
|---|---|
| Load the form's own tags | The form loads its Google tags inside itself. Only the Submitted and thank-you page events are sent |
| Send the events to your website | The form loads nothing, and its events go to your website's own Tag Manager, or straight to Google Analytics if the page has no Tag Manager. Your website team adds triggers for them. All the events below can be used |
Existing forms keep loading their own tags until you change this.
Events
Each event is shown as a card. Switch an event on or off, and change the name Google receives if you like. Names can use letters, numbers and underscores, and must start with a letter.
| Event | Name to start with | Sent when |
|---|---|---|
| Submitted | form_submit |
The form is submitted successfully |
| Payment made | purchase |
A submission takes a payment. Includes the amount, currency, a reference, one-off or regular, number of items and payment method |
| Submitted without payment | generate_lead |
A submission takes no money, such as a sign-up or RSVP |
| Form started | form_start |
Someone first fills something in |
| Page reached | form_step |
Someone moves to another page of a multi-page form. Includes the page number and number of pages |
| Validation error | form_error |
Submitting is stopped by a field that needs attention. Includes which fields and how many, never what was typed |
| Payment failed | payment_failed |
A card or payment is declined. Includes the payment method |
Only Submitted is on to begin with. The form can't be saved with two events switched on under the same name.
What every event includes
- the form's ID, name and type
- up to 10 fixed details you add, each with a name and a value – for example, appeal = spring
- the UTM tags from the link, as Google Analytics' campaign fields
Note: Nothing a person types into the form is ever sent to Google.
UTM tracking
UTM tags are the tracking part at the end of a link, such as ?utm_source=newsletter&utm_medium=email. Vega can record them on the payment, so you can report on which email, ad or post brought each gift in.
You set up UTM tracking once for your organisation, and every form uses the same attributes, so your reports are consistent across all your forms.
Setting it up
- In Vega, set up a payment attribute for each tag you want to record – for example, an attribute type Marketing with the attributes Source, Medium and Campaign.
- In Vega Forms, select Settings in the top menu.
- Under UTM tracking, choose the Attribute type at the top. Attribute group narrows a long list.
- Choose the attribute for each tag. Leave a tag as Not recorded if you don't want it on the payment.
- Select Save settings. It applies to every form straight away.
Each tag is recorded on its attribute, with whatever the link said. For example, with utm_source set to Source, a gift from ?utm_source=newsletter is recorded as Source: newsletter, and one from ?utm_source=facebook as Source: facebook.
Each tag needs its own attribute, because a payment keeps one value per attribute. The page won't save two tags on one attribute. A tag saved on a different attribute type keeps its attribute, shown with its type, until you change it.
A form's Form settings → Analytics tab lists the attributes in use, with a link to Settings. The Settings page shows who last saved it and when.
Where the tags come from
- The link someone used. The Share page can add tags to the links and QR codes it makes, and says which ones are recorded in Vega. See Putting a form on your website.
- On your website, the page's address. The website code passes the tags to the form.
- Tags are kept through a payment page, so they're still recorded after a card check.
Good to know
- On a regular gift, the tags are copied to the later payments as well.
- A form that takes no money has no payment to record them on.
- Values are cut to 150 characters, and a value that looks like an email address isn't recorded.
- UTM tags don't change the campaign a gift is credited to. Use Credit gifts to a campaign on the Share page for that.
Checking it works with debug mode
Go to Form settings → Analytics and select Test with debug mode. The form opens in test mode, so no card is needed and nothing is charged, and it:
- sends the events, marked "test"
- writes each event to the browser's console (press F12 and open Console)
- marks the events for Google Analytics' DebugView (Admin → DebugView), where they show within seconds
On your website, turn on debug mode by adding data-debug="true" to the website code, or ?vf_debug=1 to the page address. Google Tag Manager's Preview works too, including on the thank-you page.
Important: Remove debug mode from your website before the page goes live, so test events don't mix with real ones.
Ordinary test submissions, made with the Test button, send nothing to analytics.
For your website team
With Send the events to your website, each event is pushed to the page's dataLayer under its name, with its details. Add a Custom Event trigger in Tag Manager for each event name you use. The page also receives a vegaforms:event browser event with the same details, for websites that don't use Tag Manager.
Related articles
Some content in this article may have been developed with the assistance of AI tools and reviewed by staff.
Comments
0 comments
Please sign in to leave a comment.