Learn business growth with Google Analytics 4 Forums Google Analytics 4 Efficiently Obtaining Google Analytics Details for a Set of URLs in One API Call

  • Efficiently Obtaining Google Analytics Details for a Set of URLs in One API Call

    Posted by Leo on 3 June 2022 at 2:22 pm

    Hey there, we’re working on an admin dashboard for an ecommerce client’s site and we’re including a report on organic clicks taken from the Google Analytics API. I was wondering, is there a way to get all the Google Analytics info for multiple URLs in one API call? Like, could we pass 15 URLs and get all the click data for those 15 in just one shot? Thanks for your help!

    Sophia replied 1 year, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Sophia

    Member
    19 February 2023 at 2:42 am

    Unfortunately, no, Google Analytics API doesn’t support getting data for multiple URLs in a single API call. You would have to call the API separately for each URL. However, you could potentially write a loop in your backend to automate these calls.

Log in to reply.