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
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | 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.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

1 Reply 1
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | 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.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.