Hi @IsaacTakushi dear i am facing another problem in hubspot.How to send Events from hubspot to Google Analytics.. I want to set Form field if google analytics cookie is set.I embeded js code on form and add that form on landing page but it does not set form field(google_client_id) when i fill the form on landing page..can you solve this problem.please review my code.
In all Hubspot forms add "GA Client id" as an optional hidden field Modify the script tag on all Hubspot forms to set ga_client_id if the GA cookie is set
I understand that you're looking to send events from HubSpot to Google Analytics by maniuplating the jQuery and it seems that it is currently not working.
On my end, I tried testing out the code that you provided using a string field and it looks like all is working. Narrowing down to the if condition, it also seems that, there wouldn't be an issue.
Hence, I believe the issue here is likely due to this line of code:
@WendyGoh can i add a javascript functions on Forms and on Landing Pages..if yes then please tell me how to add javascript code on forms and landing pages...
"Marketing Free and Starter forms are rendered in an iframe through js.hsforms.net/forms/shell.js instead of js.hsforms.net/forms/v2.js, so they cannot be manipulated with jQuery or styled with on-page CSS."
If your team subscription is any ofMarketing Basic, Professional, or Enterprise, you can refer to this documentation here - on how to unstyled a HubSpot form.