APIs & Integrations

Riadhoq
Membre

Custom JavaScript event got deleted and won't auto-regenerate the deleted event

Hi all,

I made a custom event using the following script:

> var element = document.querySelector('meta[property="topic"]');
> var content = element && element.getAttribute("content");
> 
> _hsq.push(["trackEvent", {
>         id: content,
>         value: 1
>     }]);

Every article has a meta tag called topic with the name of the topic that creates/updates an event by the topic name. It is working well for each and every topic.

The problem is, it is not creating an event for "Economics" topic. I don't know why that is happening. Is it a bug from HubSpot's side? Any help will be greatly appreciated.

sample article: https://fee.org/articles/got-tariff-fatigue/

Thanks in advance.

3 Réponses
Derek_Gervais
Ancien salarié HubSpot
Ancien salarié HubSpot

Custom JavaScript event got deleted and won't auto-regenerate the deleted event

Hi all,

This is working as designed; if a dynamically created event is deleted in-app, HubSpot won't re-create that event from subsequent events. This is to help prevent situations where event analytics might be drastically skewed by faulty code or abuse. If you have specific events that were accidentally deleted and need to be restored, you can send me the ID/label and I can work to get those restored.

0 Votes
granthbrown
Participant

Custom JavaScript event got deleted and won't auto-regenerate the deleted event

A little more background:

The custom event that we built is working for all other tags. The issue is that it's not pulling in data for a specific tag (Economics).

We dug in a little and it looks like the "Economics" event got deleted somehow, and the trigger is not creating another event for "Economics" or "economics". But we added "Economics Debug" as an alias for Economics and that seems to work. So my question is whether it's possible to restore the deleted Economics event. We can't seem to find a way to do this outside of creating an alias.

0 Votes
wrydere
Membre

Custom JavaScript event got deleted and won't auto-regenerate the deleted event

I am seeing similar behavior. I have custom events where I push a string containing text as the id -- in the past this technique would create new events reliably. This was working as recently as 48 hours ago and no longer seems to function properly. I've tried using a VPN + anon browser to defeat any stored cookies and IP filtering, to no avail.

0 Votes