Search code examples
google-analyticsgoogle-apigoogle-analytics-firebase

Can you use Google Analytics API as Visitor Counter?


I mean like, count how many clicks the website since beginning and get their country location.

i already testing Google Analytics API but it requires to input date range, which i want from the beginning but no "Since beginning" or "All data" option available.

will set start date from year 2007 works? any suggestion?


Solution

  • will set start date from year 2007 work

    Sure, why shouldn't it. The limit is the number of rows your query returns (10 000 per query. Number of row depends on the number of distinct values for the selected combination of dimensions) and the frequency with which you run your query, not the timeframe selected.

    You can test this with the Query Explorer were you can run your metrics/dimension combinations without writing API code, so you can first check if you get the expected results.