Skip to content

Tracking changes in form dropdowns using Google Tag Manager.

It’s inevitable that at some point you’ll be asked to report on form dropdown field values/changes in analytics. GTM does make the task doable. Here’s how.
1. Define a *Custom HTML tag* that’ll capture the event: Change the select# to your required dropdown ID. If you’re tracking multiple forms you might also want to change the event: name.
2. While you’re in this tag, define the trigger that’ll fire it. Pageview – Dom ready on all would work but you could also specify the page of the form in question.
3. Next define a Custom Trigger that’s a Custom Event with an event name matching the event in step one, e.g. selectionMade.
4. Let’s put the value of the dropdown field in a variable. Create a Datalayer variable eg ‘DLV – Dropdown value’ that has a name of ‘selectedElement.value’ – the value of the selected dropdown field.
5. Next, create the event tag that creates the event, eg Event – Form Dropdown. Populate the usual Category, Action fields; the Label will be the DLV you created above.
6. Finally, the above Event will need to be fired. The trigger will be a DOM ready Custom Event and the event name will be the event name defined in 1.
So in a nutshell we’re tracking the value of the field in a dropdown, and firing an event to create an event with a label of the value.

Leave a Reply