I have installed the 'Common Analytics Plugins Extension'
Created a Rule - Initialize Plugin's
and another Rule - Initialize Time Plugin
and in-browser console I am getting the function definitions as well. This always returning the NEW instead of repeat.
but in the Cookies section - the gpv_pn cookie is not getting added, so based on this the previous page name not getting added. Once it will be drop, then with the help of the below code, will track the data.
@KMaheshAdobe recommends using the individual plugin actions instead of initializing all plugins in single action due to the increase in weight(size) of the extension. Coming to queries 1. s.getPreviousValue getting undefined & gpv_pn cookie not setting.
If we call s.getPreviousValue() without passing arguments we will get undefined only, we have to pass the arguments like s.getPreviousValue(s.pageName,"gpv_Page") as per requirement.
From the details (screen grabs) shared i assume that you're trying to set s.prop1 with previous pageName value. For this we have to define like this s.prop9 = s.getPreviousValue(s.pageName,'gpv_pn'); and make sure that your setting this after s.pageName is defined, if you call "s.getPreviousValue(s.pageName,'gpv_pn');" before defining s.pageName it won't set cookie as s.pageName is getting undefined.
2. s.getNewRepeat(); getNewRepeat() will return the visitor as "New" throughout visit(first visit after getNewRepeat is implemented) and from next visit it will return the visitor as "Repeat" till the cookie gets expired.