Aug 9, 2021 2:20 PM
I have a client that uses a mix of non-hubspot forms and hubspot forms. There are a bunch.
I have a custom property called ga_cid on the contact level. The normal value of this is taken from the Google Analytics CID, which can either be on the URL itself, if I decide to decorate the URL, or stored within the Cookie itself.
Either way, it can be retrieved with Google Tag Manager.
What I want to do is to send that value to the ga_cid property on form submission, to associate it with the user created, without having to edit the form (especially the non-hubspot forms).
Is this possible? Is there a way of sending it directly by finding out the hubspot temp or existing contact id for the page viewer using Google Tag Manager, and then sending it directly to the contact on Hubspot on form submission?
Or create a ghost form field?
Aug 10, 2021 4:30 AM
Thank you for reaching out.
Aug 10, 2021 5:05 AM
Thanks for tagging people @TiphaineCuisset .
In the meantime, I've looked into the following solution:
I looked into this solution, which is more of a 2 step solution.
I can get user token in Google Tag Manager and then request the user id using this method: https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_utk
and from there use the contacts API to update the contact directly using this call https://legacydocs.hubspot.com/docs/methods/contacts/update_contact
And I would fire this on form submission.
How would I do this 2 step process in google tag manager without getting a JSON response and make it dynamic use tag manager's variables? and this is a legacy API, which means that eventually it'll become deprecated and not usable.
Is it possible to make this work or is there a better way of doing that?
Aug 10, 2021 10:21 AM
Hi @YizSeg ,
It sounds like what they're looking for is to auto populate the form field with the "ga_cid" property that exists on the contact's record, you can explore the steps listed in this article:
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.
Aug 10, 2021 10:37 AM
Sep 30, 2021 7:08 AM
Hi. We've created a custom Google Tag Manager tag to inject GA CID form fields into Non Hubspot Forms, that can be still tracked by HubSpot. If you're about to track offline sales and/or offline conversions in GA, the CID field is by far not a single one you need to track to bypass GA filter as well as to send a proper GEO of a user, not a server. BTW, Zapier integration of HubSpot and Google Analytics doesn't even let to do so at all.