APIs & Integrations

OOzturk
Mitglied

AnalyticsAPI getting data related with all the campaings in a daily format

lösung

Hi all,

 

I am working on the Hubspot Data Sourcing project. I am trying to use the Analytics API to get all the campaign data and related metrics, but when I want to use the daily time period instead of the total, it requires me to use an additional filter, but I do not want to filter the data further.

 

In the documentation, it is not clear how to use the filter option clearly and what are all the options, so I tried to use a dummy filter like &f=true to call the API, but it returns an empty result. I just want to get the same result as the total one, but in the daily format. Below, you can find the 2 requests that I am using. I am looking forward to cooperating, thank you!

 
 
Above request works well but it shows the result in the total format.
 
 
Above query works well too, but I want to get the results for all the campaigns instead of filtering with only one campaign.
 
 
Screenshot 2022-06-23 at 11.49.28.png
1 Akzeptierte Lösung
OOzturk
Lösung
Mitglied

AnalyticsAPI getting data related with all the campaings in a daily format

lösung

- We can call /utm-campaigns/total multiple times and change the start and end date each time so that each call only returns one day.
- We can create an array with all their campaign names and loop through them, replacing the &f filter on the /utm-campaigns/daily call each time

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
2 Antworten
OOzturk
Lösung
Mitglied

AnalyticsAPI getting data related with all the campaings in a daily format

lösung

- We can call /utm-campaigns/total multiple times and change the start and end date each time so that each call only returns one day.
- We can create an array with all their campaign names and loop through them, replacing the &f filter on the /utm-campaigns/daily call each time

0 Upvotes
Jaycee_Lewis
Community-Manager/-in
Community-Manager/-in

AnalyticsAPI getting data related with all the campaings in a daily format

lösung

Hi, @OOzturk 👋 Thanks for including all those details. Let's see if we can get the conversation started for you — @jpsanchez @RMones @Gonzalo, do you have any suggestions for @OOzturk?

 

Thank you very much! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot