I am having problems by the Google Business Performance API
being late for more than 5 days to return the insights of my locations ( documentation here: Google Business Performance ).
This was the same problem I have asked before this question.
I see it continues to change, I need to be sure about the values I read.
The code is
private enum PerformanceMetrics {
BUSINESS_IMPRESSIONS_DESKTOP_MAPS,
BUSINESS_IMPRESSIONS_DESKTOP_SEARCH,
BUSINESS_IMPRESSIONS_MOBILE_MAPS ,
BUSINESS_IMPRESSIONS_MOBILE_SEARCH,
BUSINESS_CONVERSATIONS,
BUSINESS_DIRECTION_REQUESTS,
CALL_CLICKS,
WEBSITE_CLICKS
}
public static void main(String[] args) throws Exception {
business_profile_performance = initializeMyBusiness();
locationsList.stream().forEach(u -> {
for(PerformanceMetrics dailyMetric:PerformanceMetrics.values() ) {
try {
BusinessProfilePerformance.Locations.GetDailyMetricsTimeSeries metricReport =
business_profile_performance.locations().
getDailyMetricsTimeSeries(locationID).
setDailyMetric(dailyMetric.toString()).
setDailyRangeStartDateYear(Integer.valueOf("2022")).
setDailyRangeStartDateMonth(Integer.valueOf("12")).
setDailyRangeStartDateDay(Integer.valueOf("26")).
setDailyRangeEndDateYear(Integer.valueOf("2022")).
setDailyRangeEndDateMonth(Integer.valueOf("12")).
setDailyRangeEndDateDay(Integer.valueOf("27"));
GetDailyMetricsTimeSeriesResponse response = metricReport.execute();
if (!response.isEmpty()) {
System.out.println(" Response == " + response);
}
} catch (Exception e) {
System.out.println(e);
}
}
});
}
Any Experience? Thank you all.