Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics data inconsistent for Arabic language pages in Site Kit #8184

Closed
adamdunnage opened this issue Jan 25, 2024 · 3 comments
Closed

Analytics data inconsistent for Arabic language pages in Site Kit #8184

adamdunnage opened this issue Jan 25, 2024 · 3 comments
Labels
P1 Medium priority Team S Issues for Squad 1 Type: Bug Something isn't working

Comments

@adamdunnage
Copy link
Collaborator

adamdunnage commented Jan 25, 2024

Bug Description

As flagged by a user in the support forum, Analytics data for Arabic language pages/URLs is inconsistent across Site Kit displaying 0 data in some sections and the accurate data in others.

The Site Kit admin bar will display 0 data across the board for these pages which is also the case when selecting More details to view the specific page stats page. However, when checking the Site Kit Dashboard top content section you can see data for this page. Data can also be seen from the Analytics platform.

When viewing the data for the page, you can see that the URL is encoded due to the Arabic language characters. This is probably related to the way we are this in Site Kit.

All screenshots of this when testing are supplied below.

Steps to reproduce

  1. Create a page with Arabic characters
  2. Accumulate data for that page
  3. Check the data for that page in the admin bar, stats page, dashboard and Analytics platform to compare

Screenshots

SK dashboard top content: https://imgur.com/a/kiaZn1g
Page stats in SK: https://imgur.com/a/zZvVcCY
Admin bar stats: https://imgur.com/a/2HjXWB8
Data in Analytics: https://imgur.com/a/SVeNh4p

Additional Context

The test site to see this is https://plastiskip.com/ (Access to the site and Analytics account can be granted by @jamesozzie )


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

Acceptance criteria

  • Stats should show correctly for pages/URLs with slugs with special characters such as Arabic, with special attention on the Admin bar and entity dashboards
  • URLs with special characters should be displayed in their decoded forms

Implementation Brief

The problem is due to Entity URLs for single posts as WP encodes the slug when storing the post which is not automatically decoded by get_permalink.

Test Coverage

  • The above branch adds some missing coverage for Entity_Factory::create_entity_for_post

QA Brief

  • Setup Site Kit and connect Analytics module, on existing website or on a new one
  • Add a page with an Arabic title, example, copy this "عنوان صفحة الاختبار"
  • Make a few visits on it, so some views can be tracked
  • Tomorrow, verify that page is showing data in main dashboard, under Top content over the last 28 days, Site Kit admin bar dropdown on that page, and on single entity page view, and any other place/widget

Changelog entry

  • Fix Analytics data inconsistency for Arabic language pages.
@tofumatt
Copy link
Collaborator

IB ✅

@tofumatt tofumatt removed their assignment May 23, 2024
@eclarke1 eclarke1 added the Team S Issues for Squad 1 label May 29, 2024
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm Jun 18, 2024
@mohitwp mohitwp assigned mohitwp and wpdarren and unassigned mohitwp Jun 21, 2024
@wpdarren
Copy link
Collaborator

QA Update: ⚠️

Waiting for data to appear in Site Kit in 24 hours.

  • Setup Site Kit and connect Analytics module.
  • Added a page with an Arabic title.
  • Made a few visits on it, so some views can be tracked

@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • The page is showing data in main dashboard, under Top content over the last 28 days, Site Kit admin bar dropdown on that page, and on single entity page view, and any other place/widget. I compared this with Google Analytics too.
Screenshots

image
image
image
image

@wpdarren wpdarren removed their assignment Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority Team S Issues for Squad 1 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants