Closed jamesozzie closed 5 months ago
@jimmymadon Assigning this to you to take a look please when you have a moment, as our key metrics expert. :D cc @ivonac4 @aaemnnosttv
IB ✅
@kuasha420 I am unable to trigger the error message following the steps in the ticket and also how we would usually generate errors for the KMW tiles. Please could you relook at the QAB, and sggest any additional steps that are required. Were you able to recreate the error states following the instructions?
@wpdarren , I synced with @kuasha420 on this and the reason why the error could not be seen and was stuck in gathering state is because after we archive the custom dimension, it takes up to 24 hours for that to take effect.
One workaround for this is to create a new property for Google analytics in the Site Kit GA module.
Moving this ticket to Approval.
Bug Description
Unlike other key metric tiles, which do request a user "Updates" the connection to their Analytics property settings in the case of missing custom dimensions, the "Most popular product by pageviews" tile does not output the expected notice, instead displaying an error.
_Image below: The "Most popular products by pageviews" tile, and how it appears if the
googlesitekit_post_date
custom dimension is removed._The "Top recent trending tile", which displays an "Update" button when the requires custom dimensions are not present.
This may be REST related however I don't see any REST errors elsewhere on the site, or warnings in my Site Health status. The below is what appears when opening a response :
This was also tested on various hosting platforms, easily reproducible.
Many users have reported this in the support forums, with more details added to https://github.com/google/site-kit-wp/issues/8152. See the steps to recreate and other information below:
Browser Console errors
![image](https://github.com/google/site-kit-wp/assets/41326532/f2233635-0bab-480c-8aa3-2530fcc990e7) ``` googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 GET https://wexcraft.com/wp-json/google-site-kit/v1/modules/analytics-4/data/report?metrics%5B0%5D%5Bname%5D=screenPageViews&dimensions%5B0%5D%5Bname%5D=pagePath&startDate=2024-03-08&endDate=2024-03-14&dimensionFilters%5BcustomEvent%3Agooglesitekit_post_type%5D%5BfilterType%5D=stringFilter&dimensionFilters%5BcustomEvent%3Agooglesitekit_post_type%5D%5BmatchType%5D=EXACT&dimensionFilters%5BcustomEvent%3Agooglesitekit_post_type%5D%5Bvalue%5D=product&orderby%5B0%5D%5Bmetric%5D%5BmetricName%5D=screenPageViews&orderby%5B0%5D%5Bdesc%5D=true&limit=3&_locale=user 400 (Bad Request) O @ googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 (anonymous) @ googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 (anonymous) @ googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 u @ googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 (anonymous) @ googlesitekit-vendor-e5d6aae7e8fa0fa1a1e3.js:7 forEach.e.Network Request
![image](https://github.com/google/site-kit-wp/assets/41326532/45fdbf3b-83a0-4b1d-a67b-e11db297c389) ``` { "code": 400, "message": "Did you mean customEvent:googlesitekit_post_author? Field customEvent:googlesitekit_post_type is not a valid dimension. For a list of valid dimensions and metrics, see https:\/\/developers.google.com\/analytics\/devguides\/reporting\/data\/v1\/api-schema ", "data": { "status": 400, "reason": "badRequest" } } ```Steps to reproduce
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
PopularProductsWidget
to usewithCustomDimensions
similar toPopularAuthorsWidget
orTopCategoriesWidget
Test Coverage
QA Brief
Changelog entry