google / google/site-kit-wp

Data on KMW tiles does not match what is in Analytics

Open
#7,214 4 comments 0 reactions 0 assignees View on GitHub
blocked upstream Module: Analytics P2 Type: Bug
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 14h
Merged PRs (30d)
77

Description

## Bug Description

While testing the key metrics tiles I noticed that there's a difference between the data for `New visitors` when looking at the title compared with the Analytics account dashboard.

_Site Kit_ has 1.5K
![image.png](https://images.zenhubusercontent.com/5f99965247ef5a1da6985d7d/24259411-be37-42c1-8b90-e13dcfe010d1)

_Analytics_ has 1.6K
![image.png](https://images.zenhubusercontent.com/5f99965247ef5a1da6985d7d/5ed71a6b-becb-4145-87c7-f671a1814b68)

This has an impact on the calculation of the `Loyal visitors` because it is derived from the `new visitors` total.

While creating this ticket I also noticed differences in the `Most popular content by pageviews` tile where the top 3 content by page views is not the same as in Analytics.

_Site Kit_ you can see the popular pages are in a different order and the page views are different
![image.png](https://images.zenhubusercontent.com/5f99965247ef5a1da6985d7d/96d61f24-aeeb-469b-acde-a115c3298f81)

Please note that the comparisons have only been completed on 28 days to create this ticket but we should check all reporting periods in Site Kit, i.e. 7, 14, 28 and 90 days.

## Steps to reproduce

1. Set up Site Kit with Google Analytics.
2. Make sure that you have oi.ie or another site with data in developer plugin.
3. Make sure that UserInput feature flag is enabled so that the tiles load on the dashboard.
4. Observe the data as per my points above.

--------------
#6245 Discrepancies:

Please see my note re the percentage not appearing to be correct - since we have a ticket to investigate this, I do not feel that this should hold us up approving this. Thoughts?

I wanted to highlight that this tile percentage is not calculating as per the Analytics report I created.

The data below is for 28 days.

![image](https://github.com/google/site-kit-wp/assets/73545194/65ac567a-bd8b-47a4-bb2b-f85958b7255d)

1,845 Organic search / 2,343 Total users x 100 = `78.75%`

As you can see from the screenshot below, they don't match. Site Kit shows, 80.4%

![image](https://github.com/google/site-kit-wp/assets/73545194/544cade6-1584-4b57-99c5-1a6a29e7ba8b)

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* The following Key Metric Widget tiles should show the same values in Site Kit for the corresponding metrics in the GA4 Analytics Admin dashboard for the exact same date range:
* New Visitors
* Loyal Visitors
* Top Traffic Source
* Most popular content by pageviews
* Top cities driving traffic
* This should also be the case for all the date ranges supported by Site Kit.

## Implementation Brief

*

### Test Coverage

*

## QA Brief

*

## Changelog entry

*

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the discrepancy in Site Kit with Google Analytics configured, UserInput enabled, and a site with data. Compare New Visitors, Loyal Visitors, Top Traffic Source, Most popular content by pageviews, and Top cities driving traffic across the supported date ranges; done means the tile values match the corresponding GA4 Analytics dashboard values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
analytics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.