APIs & Integrations

Vi_Quyet
Member | Diamond Partner
Member | Diamond Partner

Differences in gmail data when using hubspot api

SOLVE

I use the email event api to get data about the number of mail sent to customers for a selected time period
But the result returned is different from what is displayed on Hubspot UI
How to use the data when using API matches the display on the email analysis

The difference is quite high
I need to get the correct data to make the report
Please help me answer this issue, if you know how it works
Thanks very much!

The document may match the image above get by Email Events API

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Differences in gmail data when using hubspot api

SOLVE

Hi, @Vi_Quyet.

 

Apologies for the delayed response. Thank you for sharing that information.

 

It seems you are using slightly different startTimestamp and endTimestampvalues than the email Analyze tool you referenced. If you go to this page, it shows the same statistics you reference in your screenshot, including 4,155 sends.

 

The URL shows this report is generated with the startDate=1543590000000, which is 2 hours earlier than your startTimestamp=1543597200000 and the endDate=1546268399999, which is almost a full day later than your endTimestamp=1546189200000, which only goes until 30 December instead of 31 December.

 

Since your timeframe is shorter, it contains fewer sends.

 

If you use the parameters:

  • startTimestamp=1543590000000
  • endTimestamp=1546268399999

Then I would expect the number of sends to match.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
3 Replies 3
IsaacTakushi
HubSpot Employee
HubSpot Employee

Differences in gmail data when using hubspot api

SOLVE

Welcome, @Vi_Quyet.

Happy to help.

Could you share the following?

  1. Your Hub ID.
  2. A link to the email campaign you're seeing discrepancies with? (I want to compare the up-to-date API and UI data.)

Isaac Takushi

Associate Certification Manager
0 Upvotes
Vi_Quyet
Member | Diamond Partner
Member | Diamond Partner

Differences in gmail data when using hubspot api

SOLVE

Thanks Takushi,

i used url : url = "https://api.hubapi.com/email/public/v1/events?" + str(offset) + "hapikey=my_key_api&eventType=SENT&startTimestamp=1543597200000&endTimestamp=1546189200000&limit=1000"

and get result = 4189 with time start = 12/01/2018 and time end = 31/12/2018

Differential results 4189 - 4155 = 34
Can you help me explain that difference ? Thanks so much!

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Differences in gmail data when using hubspot api

SOLVE

Hi, @Vi_Quyet.

 

Apologies for the delayed response. Thank you for sharing that information.

 

It seems you are using slightly different startTimestamp and endTimestampvalues than the email Analyze tool you referenced. If you go to this page, it shows the same statistics you reference in your screenshot, including 4,155 sends.

 

The URL shows this report is generated with the startDate=1543590000000, which is 2 hours earlier than your startTimestamp=1543597200000 and the endDate=1546268399999, which is almost a full day later than your endTimestamp=1546189200000, which only goes until 30 December instead of 31 December.

 

Since your timeframe is shorter, it contains fewer sends.

 

If you use the parameters:

  • startTimestamp=1543590000000
  • endTimestamp=1546268399999

Then I would expect the number of sends to match.

Isaac Takushi

Associate Certification Manager
0 Upvotes