Skip to content

[Analytics Hub] Update endpoint for visitor stats in Sessions card #10947

@rachelmcr

Description

@rachelmcr

On the Sessions card, we are currently using the endpoint /rest/v1.1/sites/{SITE}/stats/visits/ to fetch visitor stats and sum the values from all intervals to get the summary of the period. This is not accurate, as pointed out in pe5pgL-1p6-p2.

We should use the same strategy as iOS to display visitor stats, using the endpoint /sites/{SITE}/stats/summary. The only additional calculation we need to do in that case is to fetch and sum three months of data when a quarter date range (Quarter to date, Last quarter) is selected. iOS implementation: woocommerce/woocommerce-ios#8412

Discussion: p1708606044423369-slack-C02KUCFCSFP

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions