Home > Software design >  How long is the Google Business Profile Performance API latency for preparing the information(Data F
How long is the Google Business Profile Performance API latency for preparing the information(Data F

Time:12-30

I am using this API Business Profile Performance, and I see few documentation. Does anybody know how long it takes for Google to respond?
I see 48 to 72 hours delay.Is it happening for others, or something is wrong with my code?

For making the code shorter, suppose that the function initializeMyBusiness() is responsible for initialising the API via its Builder and also takes care of authentication.

locationsList is a List of Strings including the location IDs' of the client.

 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);
            }

        }
    });

}

CodePudding user response:

This is working as expected, the data does not become stable before the 48 to 72 hours you are observing.

  • Related