18F / analytics.usa.gov

The US federal government's web traffic.
https://analytics.usa.gov
Other
721 stars 191 forks source link

How to obtain traffic source and other metrics, for specific domain #1384

Open rsaridena opened 1 week ago

rsaridena commented 1 week ago

What kind of issue?

User story

As a user, I would like to obtain different metrics, for a specific domain.

Top Pages count Traffic source Top referrals Session count Bounce rate

Acceptance Criteria

Notes

Multiple APIs for fetching the above data

Tasks (Optional)

levinmr commented 1 week ago

For session count, an API endpoint exists currently (the data returned will be labelled "visits" this is the same as sessions):

https://api.gsa.gov/analytics/dap/v2/domain/www.example.gov/reports/site/data

For the other requests, these would be new reports for the API. @smarina04 / @MaroyaF may determine if these can be added to the project backlog.

rsaridena commented 1 week ago

Thanks @levinmr Checked the response of this API. Can you pls confirm if the "visits" refer to individual pages count or user sessions count? The volume looks to be higher for session count, for the domain that we are checking. { "id": 35252964, "date": "2024-09-10", "report_name": "site", "report_agency": "health-human-services", "domain": "mchb.hrsa.gov", "visits": 4563 },

levinmr commented 1 week ago

Thanks @levinmr Checked the response of this API. Can you pls confirm if the "visits" refer to individual pages count or user sessions count? The volume looks to be higher for session count, for the domain that we are checking. { "id": 35252964, "date": "2024-09-10", "report_name": "site", "report_agency": "health-human-services", "domain": "mchb.hrsa.gov", "visits": 4563 },

Visits == Session count