Analytics is not working for all pages and spaces
Asked by Naeem Shahzad Malik:

We have recently updated our confluence installation to Confluence LTS version 7.13.2 Build-nummer8703 for data-center. Before we didn't had analytics installed.

We have analytics enabled but it only works for pages that are created after 1.12.2021. We upgraded the system 22.11.2021.  
It also doesn't work for pages that were created before the upgrade or pages that were created before but updated after 1-12-2021.  
When we try to access Analytics from top toolbar (red ring) it quickly shows "loading" and vanishes without any error on screen or in application logs.

It works only when we click analytics from toolbar that is aligned with edit button (blue ring), but again only for pages created after 1.12.2021.

![toolbar.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/172443i0ACF12DB6183C891/image-size/large?v=v2&px=999 "toolbar.PNG")

Not sure if this is an error or expected behaviour. Any assistance you can provide would be greatly appreciated.


Answers:
author: Craig Castle-Mead
body: Hi [@Naeem Shahzad Malik](/t5/user/viewprofilepage/user-id/4662529)

We're also running 7.13.2 DC and both types of Analytics links (the ones you circled in blue and red) work (we get sent to a /plugins/confanalytics/analytics.action type URL and a graph/table load). Statistics are only available from the date of the upgrade.

It's good you've checked the application logs, but wondering if you've looked at the browsers Javascript console errors? I'd also suggest going in to safe mode (disable all the apps) and seeing if you can replicate the error - there may be a marketplace app that's conflicting.

CCM

comments: author: Naeem Shahzad Malik
body: Thanks for your reply, I'll check that and update


author: Naeem Shahzad Malik
body: Thanks for your advice. It seems the problem is related with Chrome and everything works fine in Edge.   

In Chrome I logged following console errors when I clicked "analytics". Domain is replaced with dummy.domain. Anthing you can see that seems abnormal?

```
JQMIGRATE: Migrate is installed, version 1.4.1
batch.js?locale=no-NO:489 Use of `window._` through AUI is deprecated and will be removed in AUI 10.0.0
33
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at HTMLMetaElement.<anonymous> (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2529:301)
batch.js?locale=no-NO:2225 Editor V4 Compatibility mode enabled.
batch.js?locale=no-NO:2225 Replaced WRM.require by a wrapper function to provide compatibility for the editor upgrade.
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at Module../frontend/src/components/migration-banner/migration-banner.js (https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?enabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:8143:1946)
DevTools failed to load source map: Could not load content for https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?addonengine.analytics:analytics,atl.general,main,space,-_super/main.js.map: HTTP error: status code 503, net::ERR_HTTP_RESPONSE_CODE_FAILURE
batch.js?locale=no-NO:2220 DEPRECATED JS - AJS.debounce has been deprecated since 8.0.0 and will be removed in 10.0.0. Use equivalent functions from libraries like lodash / underscore instead 
at f.init (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?0e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2890:2027)
DevTools failed to load source map: Could not load content for https://dummy.domain/s/ab3e2bd?-CDN/-hbv56w/8?ddonengine.analytics:analytics,atl.general,main,space,-_super/main.css.map: HTTP error: status code 503, net::ERR_HTTP_RESPONSE_CODE_FAILURE
batch.js?locale=no-NO:325 Downloading resources:
js!/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-hbv56w/8703/4mhn8a/d7af2c94c0d43296eb66276d8b10a7b5/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-space/batch.js!order
batch.js?locale=no-NO:2220 DEPRECATED JS - PopulateParameters has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at HTMLDocument.<anonymous> (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?0e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2375:1249)
batch.js?locale=no-NO:2220 DEPRECATED JS - Dialog has been deprecated since 6.0.6 and will be removed in a future release. Use require('confluence-create-content/space-blueprint') 
at https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?e80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:3320:56
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at appendAnnouncementBanner (https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?tenabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:3100:144)
batch.js?locale=no-NO:2220 DEPRECATED JS - Inline dialog constructor has been deprecated and will be removed in a future release. Use inline dialog 2 instead. 
at n (https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?tenabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:3573:387)
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at Object.getText (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:3045:364)
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at Object.getText (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:3045:364)
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?enabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:8143:2023
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?enabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:8143:2085
batch.js?locale=no-NO:2220 DEPRECATED JS - Load has been deprecated since 8.0.0 and will be removed in 10.0.0. We recommend use of other open-source templating engines, such as "lit-html" or "react". If you cannot do without this templating function, it is available as its own Node package: "@atlassian/aui-template". 
at https://dummy.domain/s/fa2603e?-CDN/-hbv56w/8?tenabled=true&locale=no-NO&slack-enabled=true&user-logged-in=true:10773:47
batch.js?locale=no-NO:2220 DEPRECATED JS - AJS.template has been deprecated since 8.0.0 and will be removed in 10.0.0. We recommend use of other open-source templating engines, such as "lit-html" or "react". If you cannot do without this templating function, it is available as its own Node package: "@atlassian/aui-template". 
at Function.o.load (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?0e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2410:1073)
batch.js?locale=no-NO:285 JQMIGRATE: Migrate is installed, version 1.4.1
batch.js?locale=no-NO:489 Use of `window._` through AUI is deprecated and will be removed in AUI 10.0.0
11
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at HTMLMetaElement.<anonymous> (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2529:301)
adrum.js:29 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b/oaut?Id%22%3a%22e3dd441e-f07b-4f0d-a8c7-54f59f571358%22%7d%23EndOfStateParam%23 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
22
batch.js?locale=no-NO:2220 DEPRECATED undefined - AJS.params has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at HTMLMetaElement.<anonymous> (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2529:301)
batch.js?locale=no-NO:2225 Editor V4 Compatibility mode enabled.
batch.js?locale=no-NO:2225 Replaced WRM.require by a wrapper function to provide compatibility for the editor upgrade.
batch.js?locale=no-NO:2220 DEPRECATED JS - PopulateParameters has been deprecated since 9.0.0 and will be removed in 10.0.0. 
at HTMLDocument.<anonymous> (https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?0e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:2375:1249)
batch.js?locale=no-NO:2220 DEPRECATED JS - Dialog has been deprecated since 6.0.6 and will be removed in a future release. Use require('confluence-create-content/space-blueprint') 
at https://dummy.domain/s/67a8214?-CDN/-hbv56w/8?e80e0e7e93/_/download/contextbatch/js/_super/batch.js?locale=no-NO:3320:56
adrum.js:29 TypeError: Failed to execute 'setTimeout' on 'Window': 1 argument required, but only 0 present.
at window.<computed> (adrum.js:80)
at HTMLDivElement.handleChangeMonthYear (batch.js?healthcheck?-logged-in=true:106)
at i._notifyChange (batch.js?healthcheck?r-logged-in=true:81)
at i._setDate (batch.js?healthcheck?r-logged-in=true:81)
at i._setDateDatepicker (batch.js?healthcheck?r-logged-in=true:81)
at HTMLDivElement.<anonymous> (batch.js?healthcheck?r-logged-in=true:81)
at Function.each (batch.js?locale=no-NO:33)
at u.fn.init.each (batch.js?locale=no-NO:29)
at u.fn.init.e.fn.datepicker (batch.js?healthcheck?r-logged-in=true:81)
at batch.js?healthcheck?-logged-in=true:106
adrum.js:29 TypeError: Failed to execute 'setTimeout' on 'Window': 1 argument required, but only 0 present.
at window.<computed> (adrum.js:80)
at HTMLDivElement.handleChangeMonthYear (batch.js?healthcheck?-logged-in=true:106)
at i._notifyChange (batch.js?healthcheck?r-logged-in=true:81)
at i._setDate (batch.js?healthcheck?r-logged-in=true:81)
at i._setDateDatepicker (batch.js?healthcheck?r-logged-in=true:81)
at HTMLDivElement.<anonymous> (batch.js?healthcheck?r-logged-in=true:81)
at Function.each (batch.js?locale=no-NO:33)
at u.fn.init.each (batch.js?locale=no-NO:29)
at u.fn.init.e.fn.datepicker (batch.js?healthcheck?r-logged-in=true:81)
at batch.js?healthcheck?-logged-in=true:106
(anonymous) @ adrum.js:29
b @ batch.js?healthcheck?-logged-in=true:483
(anonymous) @ batch.js?healthcheck?-logged-in=true:127
(anonymous) @ batch.js?healthcheck?-logged-in=true:139
(anonymous) @ batch.js?healthcheck?-logged-in=true:139
(anonymous) @ batch.js?healthcheck?-logged-in=true:139
(anonymous) @ batch.js?healthcheck?-logged-in=true:127
f @ batch.js?healthcheck?-logged-in=true:127
b @ batch.js?healthcheck?-logged-in=true:132
(anonymous) @ batch.js?healthcheck?-logged-in=true:132
(anonymous) @ batch.js?healthcheck?-logged-in=true:414
(anonymous) @ batch.js?healthcheck?-logged-in=true:414
dispatch @ batch.js?healthcheck?-logged-in=true:127
(anonymous) @ batch.js?healthcheck?-logged-in=true:483
(anonymous) @ adrum.js:29
```


author: Craig Castle-Mead
body: Have you tried Chrome in an incognito session? Removing potential issues like Chrome Extensions, stale caches etc is always a good debugging step

CCM


author: Naeem Shahzad Malik
body: That didn't help much either. We don't have many extensions and all users have consistent behaviour in Chrome. If that was a policy error, extensions or cache issue, then also pages updated later shouldn't work.

I see some "deprecated" errors in console error, but again don't understand why it works for pages created after 1.dec. It's also possible to copy a page created before 1.dec and the new page works perfectly with similar content.


author: Craig Castle-Mead
body: I can't see anything listed on JAC related to this - [https://jira.atlassian.com/issues/?filter=98691\&jql=project%20%3D%20CONFSERVER%20AND%20resolution%20%3D%20Unresolved%20and%20affectedVersion%20IN%20(7.13.2)%20%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC](https://jira.atlassian.com/issues/?filter=98691&jql=project%20%3D%20CONFSERVER%20AND%20resolution%20%3D%20Unresolved%20and%20affectedVersion%20IN%20(7.13.2)%20%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC)

You may want to lodge an Atlassian Support request via <https://getsupport.atlassian.com/> and see if they can assist.

<br />

CCM


author: Naeem Shahzad Malik
body: aha, I'll give it a go, thanks for your assistance so far :)


author: Naeem Shahzad Malik
body: <https://getsupport.atlassian.com/servicedesk/customer/portal/41/PSSRV-28118>

Thanks for your help :)


Tags: atl-gruland

confluence-server

server