Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Creating a calculated metric with getPercentPageViewed value

Avatar

Level 3

Hi There!

I'm using the getPercentPageViewed plug-in. I'm writing the value to a prop.

The values for any page come in as 100, 99, 98 and so on. We have a lot of long-scrolling pages on our site.

I'm hoping to build a calculated metric, specifically get the AVG percent viewed for each page on my site. 

I've been trying to build a metric by using the MEAN function and then dropping in the prop. 

It says that I need to add a metric, but not quite sure what that means.

Any guidance on how to do this? 
Thank you!

Curtis

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @curtis_pond 

the getPercentViewed values you are passing in as prop or eVar are custom dimensions, meaning text values and not numbers / metrics. That is why you cannot use props or eVars in your case.

 

this is also what you are seeing in the examples here https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/plugins/getpercentpageviewe... 

 

what may be an alternative approach could be using classifications to create buckets of scroll depth e.g., 0-25%, 26-50%, 51-75%, >75%

 

These are the classification rule regexes I typically use for this

  • ^(\d|1\d|2[0-5])$
  • ^(2[6-9]|[34]\d|50)$
  • ^(5[1-9]|6\d|7[0-5])$
  • ^(7[6-9]|[89]\d|100)$

IMG_7166.jpeg

it will not generate averages, but good enough to draw conclusions from it.

 

Hope that helps

 

P.S. haven't tried dedicated event values e.g., event99=50 which will actually increase that metric by 50, which would theoretically create the base for a calculated metric you were initially looking for. Would be interesting to hear if anyone made this work

Cheers from Switzerland!


View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @curtis_pond 

the getPercentViewed values you are passing in as prop or eVar are custom dimensions, meaning text values and not numbers / metrics. That is why you cannot use props or eVars in your case.

 

this is also what you are seeing in the examples here https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/plugins/getpercentpageviewe... 

 

what may be an alternative approach could be using classifications to create buckets of scroll depth e.g., 0-25%, 26-50%, 51-75%, >75%

 

These are the classification rule regexes I typically use for this

  • ^(\d|1\d|2[0-5])$
  • ^(2[6-9]|[34]\d|50)$
  • ^(5[1-9]|6\d|7[0-5])$
  • ^(7[6-9]|[89]\d|100)$

IMG_7166.jpeg

it will not generate averages, but good enough to draw conclusions from it.

 

Hope that helps

 

P.S. haven't tried dedicated event values e.g., event99=50 which will actually increase that metric by 50, which would theoretically create the base for a calculated metric you were initially looking for. Would be interesting to hear if anyone made this work

Cheers from Switzerland!


Avatar

Community Advisor and Adobe Champion

In addition to this, while not ideal, you could pull those values into Report Builder, and use excel to convert the text to numbers and create your math there...

 

I know this means taking the data out of Adobe, but at least you can get the results.

Avatar

Level 3

Hi @Jennifer_Dungan ! 

Thank you for the suggestion. That's a great approach for wrangling data outside of Adobe and one I'm sure I'll have to use

Cheers,

Curtis

Avatar

Level 3

Thank you, @bjoern__koth . I started exploring your suggestion yesterday and this looks like it might work. I appreciate you taking the time to provide your input and the background on custom dimensions. Thanks much!

Avatar

Level 2

Hi @bjoern__koth ,

We implemented the Initial Percent Page Viewed and Percent Page Viewed as events. To calculate % Scroll:

 

  • Percent Page Viewed (event 166) / Page Views
  • MINUS
  • Initial Percent Page Viewed (event 167) / Page Views

We divide by page views to get the "average" number before calculating scroll. Otherwise we were getting higher than 100% numbers (as to be expected with a numeric event).

 

Thank you for this post!

[@Jennifer_Dungan , @curtis_pond ]