humanmade / altis-analytics

Analytics module for Altis
https://www.altis-dxp.com/resources/docs/analytics/
GNU General Public License v3.0
9 stars 3 forks source link

Insights view for A/B block shows a blank page #381

Closed mikelittle closed 1 year ago

mikelittle commented 1 year ago

Steps to reproduce:

  1. On a clean install of Altis v14, create an A/B block on a post.
  2. Populate the block and publish the post
  3. Visit the post in multiple browsers until both options are seen (to ensure stats for each variant are recorded)
  4. Visit the Dashboard > Insights page
  5. Click the name of the A/B block (e.g. Test post A/B Test 1)
  6. Observe the page is mostly blank

I expected to see a page showing impression counts for each variant.

Screenshot 2023-06-06 at 17 09 59

Console error:

TypeError: e.variants is undefined
    append https://altislocal.altis.dev/vendor/altis/aws-analytics/build/blocks/ui.26890e59.js:9
    L https://altislocal.altis.dev/vendor/altis/aws-analytics/build/blocks/ui.26890e59.js:9
    L https://altislocal.altis.dev/vendor/altis/aws-analytics/build/blocks/ui.26890e59.js:9
    ct https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    os https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Ur https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Ir https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Dr https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Pr https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Nn https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    unstable_runWithPriority https://altislocal.altis.dev/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9
    xn https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Nn https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    _n https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Er https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    Rt https://altislocal.altis.dev/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9
    e https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:9
    t https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:9
    o https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    b https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    p https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    x https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    i Redux
    C https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    k https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    dispatch https://altislocal.altis.dev/wp-includes/js/dist/data.min.js?ver=d8cf5b24f99c64ae47d6:2
    Redux 4
react-dom.min.js:9:64017

Acceptance criteria:

wisyhambolu commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @ferschubert-hm @jerico @kovshenin @mikelittle

mikelittle commented 1 year ago

Check in V15 and in Dev Master If the issue occures there fix and backport to v14

sachinsangde19 commented 1 year ago

Hi Team,

Could you please let us know if there is any progress being made here please?

Thanks, Sachin.

mikelittle commented 1 year ago

I have been researching this today and haven't yet got to the root cause. What I found so far, is that the issue happens in v15. v14, v13, all the way back to v12. In fact I tried it quickly in v11 and it occurs there too. In v12 I rolled back all Altis module updates back to their 12.0.0 version and it still happens. I suspected maybe it is related to a browser change, so I tried under Firefox 102 (from mid-2022) and it still exhibits the same issue. I will continue to investigate next week.

sachinsangde19 commented 1 year ago

Thank you @mikelittle

mikelittle commented 1 year ago

Progress on this has been strange. I believe the issue may be timing or cache related. All of the A/B blocks I have created that errored on their insights page, now work and show the counts. In one case I had it show up straight away, but most seem to take at least an hour. It is not normal Redis cachingf as flushing the cache does not immediately fix things. More investigation needed.

mikelittle commented 1 year ago

This was fixed by https://github.com/humanmade/aws-analytics/pull/556