There is an old version of Google Analytics that calculates the number of visits to a certain page.
1.$result = $analytic->get($start_date, $end_date, "ga:pageviews", ["filters" => "ga:pagePath=~my url"] );
The metric "ga:pageviews" and a filter along the path are used, as well as other code
2..$result = $analytic->get($start_date, $end_date, "ga:users", ["filters" => "ga:landingPagePath=~my url"] );
Same design with different parameters.
It is necessary to transfer everything to Google Analytics version 4.
In the first case, instead of the "ga:pageviews" metric, I use totalUsers and a filter by pagePath. As I learned that "ga:pageviews" did not add version 4 and they advise using it. But the data in comparison is very small and I already doubt that I took the right parameters. Although I read somewhere that in version 4 it no longer reads bots.
In the second case, I used totalUsers and a filter by landingPage.
Also, the data will be more modest. Did I do it right, is there any page where a list of properties of version 3 is collected and how it can be replaced with properties of version 4.
The ones I used were taken from the official website.
Client for working with API from GitHub
Please tell me what metrics and indicators should be used. Thank you in advance