HubSpot dropdown field value passed to GTM event label

Hi,

We are trying to use GTM to create an Analytics Event that would trigger each time a HubSpot form is submitted. That part is easy, but we would also like to have the value of a custom dropdown property in the form to be saved in the Event Label.

We tried a few different ways (also some found on this forum) but we could not make it work. Has anyone done this kind of thing before?

Hi, @yasiooy :waving_hand: Did you make any progress here?

If not, I have some troubleshooting questions to help or community understand the issue clearly.

Questions:

  • Can you confirm that the onFormSubmit callback is being triggered?
    console.log("Form submitted!")
  • Can you see the selected dropdown value in the browser’s console?
    console.log(dropdownValue)
  • Can you see the ‘hubspot_form_submission’ event and the associated dropdown value in your browser console?
    console.log("Data Layer Content:", window.dataLayer);
  • In the GTM Preview Mode, is the {{hubspotFormDropdown}} variable capturing the value as expected?

My goal is to understand where in the process things might be breaking down.

Thanks for the additional information! — Jaycee