APIs & Integrations

CharlesBirdSeed
Member

Creating Historical Events

Hi,

The company I work for have recently moved to Hubspot.

I've just implemented event tracking through the Enterprise Events HTTP API (https://developers.hubspot.com/docs/methods/enterprise_events/http_api).

This is all working as expected, however a significant issue that I'm having is that I can't specify the timestamp for an event, it seems to just be set as the current time that the event is triggered.

The problem with this for us is that we have events specific to our contacts to track how many times they've created a project.

If we want to create a list of all the people who have never created a project by adding a filter of where the event has never occurred then the list would also contain all of the contacts that had created a project in our system but not since we implemented the event tracking.

My solution to this would be the following:

Doing a database query for all of the projects and adding an event for each of their creators. This would work but only if I could specify the date on the event as otherwise all the stats will be skewed as contacts will show as having created hundreds of projects at the time I ran the job.

Is there a way to specify the date on events, it doesn't look like it from the documentation however this seems like the sort of issue that would be quite common considering most people wouldn't have hubspot implemented before their system is up and running.

Any help would be greatly appreciated.

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Creating Historical Events

Hi @CharlesBirdSeedata,

You're correct, it's not possible to create historical events using the Tracking Code API. Custom events are fairly simplistic, and can only be created for the current time. If you need a more robust system for creating/handling events, you might consider using the Timeline API:

0 Upvotes