Passing Hubspot Marketing ID To GTM Data Layer

Hi there, I’m wondering if anyone has successfully done this? I am looking to pass unique marketing IDs from our CRM to a client’s pixel in GTM, but first need this pushed to our GTM data layer. I’ve been having a hard time finding what the macro is for this marketing ID. I’ve read a lot on the form GUID, would passing the hs-form-guid solve for this or are form GUIDs not uniquely generated for each user upon submission? Has anyone had luck with passing through the contact ID / user matching?

Any and all help is welcomed!

Hi @EBloom, I hope that you are well!
Thank you for asking the Community!
I moved your post to the Developers Forum so that you can get help from experts in this field for more visibility.
I found for you this similar thread with a solution from @TeunGoogle Tag Manager - Push Form Data to dataLayer” that might help you.
I’d like to share these resources that can also help:
- Find your form GUID
- Get a form by its unique ID
- Submit data to a form
I also wanted to invite a couple of subject matter experts to this conversation: Hi @Teun, @alyssamwilie and @jonchim do you have suggestions to help @EBloom, please?
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation :slightly_smiling_face:
Thank you very much and have a great day!
Best,
Bérangère

Hi @EBloom,
When you refer to contact ID, are you referring to the object ID in the CRM? I don’t believe that id is generated until the form is submitted so I don’t think there’s anything you can pass through until the thank you page maybe there’s a conversion snippet you can pass but even then i think there’s a slight delay upon submission and record creation. I think the thread @BérangèreL linked above from Teun’s solution might be the better route since you’ll be passing the email directly from the input as the form is being submitted.