CMS Development

vandnakapoor19
Member

HTML javascript is not getting executed.

SOLVE

I am new in HubSpot Development. Excuse me if my query is very basic.
I have created one onload JavaScript for HubSpot forms on Google Tag Manager & not able to console the information on the HubSpot form console. Any pointers, If I'm missing anything here

    console_hubspot.PNG
0 Upvotes
1 Accepted solution
amwilie
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

HTML javascript is not getting executed.

SOLVE

Heya @vandnakapoor19 ,

If you want to trigger something on window load you would want to use GTM's Window Loaded trigger instead of Page View. With Window Loaded set as the trigger then all you would need is the console.log bit in your script instead of adding an extra window event listener.

If this answer solved your question, please mark it as the solution!

border

Alyssa Wilie

Web Developer at LyntonWeb

Kickstart your success on HubSpot's CMS with a theme by the HubSpot experts at Lynton


View solution in original post

1 Reply 1
amwilie
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

HTML javascript is not getting executed.

SOLVE

Heya @vandnakapoor19 ,

If you want to trigger something on window load you would want to use GTM's Window Loaded trigger instead of Page View. With Window Loaded set as the trigger then all you would need is the console.log bit in your script instead of adding an extra window event listener.

If this answer solved your question, please mark it as the solution!

border

Alyssa Wilie

Web Developer at LyntonWeb

Kickstart your success on HubSpot's CMS with a theme by the HubSpot experts at Lynton