APIs & Integrations

jstrothman
Member

Include tags in events js tracking

We would like to programmatically add HS event tracking to our CMS. We are successfully doing so, sending a string for the eventID. We are not using the event value.

Example of successful event tracking from our CMS:

"document.getElementById("download-button-1").onclick = function() {
_hsq.push(["trackEvent", {
id: "Downloaded Path to Equity Paper",
value: 1
}]);
};"

We would like to also send tags with this event information. Is it possible to send a tags variable through the javascript setting of events?

4 Replies 4
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Include tags in events js tracking

Hi @eoswald,

I'm not aware of any plans to change the list segment functionality of enterprise events, or to implement bulk tagging. Depending on your use case, you might consider using the Timeline API, which will allow you to create events on object timelines. If you have the inclination, you can also check out the Ideas Forum on the HubSpot Community. There, you can create a post including your use case that product and other customers can see.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Include tags in events js tracking

Hi @jstrothman,

@eoswald is correct; it's not possible to include tags when creating events via the Tracking Code API. Tags must be added to event definitions in the events report UI.

0 Upvotes
eoswald
Participant

Include tags in events js tracking

and they have to be added one at a time... that is painful and hard to keep track of which ones are not tagged I have 100+ events of various types.
And there is no way to create a list of who has completed an event of a certain tag. I have to add a and filter each individual event. Tags are not a part of the event filter in the smart lists.

any plan on enhancing this feature?

0 Upvotes
eoswald
Participant

Include tags in events js tracking

I am doing the same thing but there is no way to pass a tag to HubSpot that I have found. I am able to go back and manually add one to the event in HubSpot but that is tedious.

0 Upvotes