Here is what I did, and hopefully it will work for you. I created a new data element and set the type to custom script. In the editor I added the getPreviousValue() and split() plugin code and then called getPreviousValue() with the current page name, returning the return value. I use this data element on all page views to fill in a prop and an eVar with the previous page name.
Hello Christy, I like your approach because I'm not comfortable with putting it in Library Management so that I can keep my code most recent version. I'm working with a Single Page App, so i'm not sure if this will work. Something's not working correctly because I'm not seeing anything returned.
Here's my data element custom code:
* Plugin: getPreviousValue_v1.0 - return previous value of designated
* variable (requires split utility)
var s = _satellite.getToolsByType('sc').getS();
Using this plug-in, you can capture the value of an Analytics variable on the next page view. For an example, capturing the s.pageName value from the previous page view into a Custom Traffic variable i.e. previous page value in a variable of your choice.
Thanks for helping me. Right now my next page flow reports have data in it. I would like to have a prop to capture them so that i can use it in my analysis workspace. But can you explain more about how to setup previous page report into a prop using cookie or data element?