Is there anyway to calculate unique pageviews (e.g. the number of visits that viewed a given page) that led to an event? Specifically I am trying to figure out the total unique pageviews leading to an order event for all pages.
Example:
A-G are all different pages.
Visit path 1: B > C > B > D
Visit path 2: B > E > B > D
Visit path 3: A > B > C > B > C > E > F > D > G
Visit path 4: B > C > B > F
If the desired event is the visitor reaching page D, then the following would be each page's 'Unique Pageviews Leading to an Event'
A: 1
B: 3
C: 2
D: n/a
E: 2
F: 1
G: 0
This is similar to how Google Analytics calculates unique pageviews, but adds one additional step by filtering out pageviews that didn't lead to an event.