Creating custom events via JavaScript on the fly?


#1

I know I can create events in HubSpot, and push them in my JS using their numerical ID. However, is there any way to push an event that doesn’t yet exist, by providing a string for the event name/label? Similar to a Google Analytics event, I suppose…


Hubspot custom javascript triggered multiple times for one click
#2

Yep, just send in the event name you want. https://developers.hubspot.com/docs/methods/tracking_code_api/javascript_events_api


#3

Wellllll that’s a little embarrassing for me, huh? It’s right in the docs. Thanks for pointing that out - glad this is possible.