How to get page read duration time in AEM? | Community
Skip to main content
Mario248
Level 7
September 11, 2023
Solved

How to get page read duration time in AEM?

  • September 11, 2023
  • 3 replies
  • 2454 views

I want to get page read duration time for aem pages. I am planning to get the total number of words on the page and divide them by 240 to get an approximate page read time. Planning to consider image and video read time, for image it is 7S and for video it is 40s.

I am looking for a solution to get numbers of words on a page. Is there any way in AEM to get this number of words? Basically I need to traverse to all components and get the text and calculate the number of words.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jeremylanssiers

I am not very familiar with Adobe Analytics, but reading the documentation it seems to be a feature:

https://experienceleague.adobe.com/docs/analytics/components/dimensions/time-spent-on-page.html?lang=en 

3 replies

Shashi_Mulugu
Community Advisor
Community Advisor
September 11, 2023

@mario248 if you are looking for medium style to display read time of a blog/article, I would recommend to go with Javascript plugin instead of doing this at AEM, which I feel very cumbersome and unnecessary to reinvent wheel.

 

https://www.npmjs.com/package/reading-time

Mario248
Mario248Author
Level 7
September 13, 2023

Thanks for your input. I am planning to do this in server side. Is there any utility available for java?

Level 3
September 11, 2023

You should do this via JavaScript in the Frontend.

 

You can ship that JavaScript code with either Clientlibs or via a ui.frontend module. You can probably find some npm packages to do this for you OOTB. Also note that web analytics tools such as Google Analytics have this built-in.

Mario248
Mario248Author
Level 7
September 12, 2023

Do you know if this feature is available in adobe analytics ?

kautuk_sahni
Community Manager
Community Manager
September 12, 2023

The average time on the page is available with AA. This would help If you are planning to do offline analysis but not for runtime.

See: https://experienceleague.adobe.com/docs/analytics/components/metrics/average-time-on-site.html?lang=en

 

Kautuk Sahni
kautuk_sahni
Community Manager
Community Manager
September 13, 2023

@mario248 Do you find the suggestions from Users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity.

Kautuk Sahni