Discussion
Google Analytics - applied approach of implementation
We have implemented GA in our project successfully. We would like to share the solution on forum of PDN community in order to get some feedback with regard to proposed approach.
First of all, all web applications with dynamic content (without changing URLs between pages) have to be considered as “single-page applications”. In that case there is a need of “virtual pageviews” creation as is described in GA docs: https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications.
Our project’s specifics requires two different approaches depending on the content we want to track. First of them concerns tracking harnesses. To track user flow between harnesses one must add GA script in “Scripts & styles” tab in harness rule (without <script> html tag). It will be saved as TextFile rule.
In second case we wanted to track dynamically changing content inside of harness. This is a little bit more complex approach. For this purpose we created one custom control per every section we want to track. In “HTML” tab of control rule we entered GA script wrapped with <script> tag. Such prepared control need to be placed in the layout. To do that one must place one of the out of box controls (e.g. Label) and then in its properties one must change control type to the custom created control. That’s it.
Please give us a feedback regards our approaches. Maybe some of you have already experience with GA implementation in Pega7 application and know better solutions. If yes, please let us know.
Thank you for contributing.
The implementation detail that you provided is valuable and clearly explained but the problem that you solved is difficult to picture.
Would it be possible to provide examples of:
1) User flow between harnesses? What type of "user flow" is taking place?
2) Dynamic content changes within a harness. What types of changes are worthy of being tracked?
Not wanting to know specific details how the application that you worked on is being used - I am certain that is confidential.
Just wanting to know in general terms how your solution can be used in other possible applications.