Hi @bindukumari90 ,
For example, assume the following code runs on the first page of the visit:
s.pageName = "Home";
s.prop7 = getPreviousValue(s.pageName,"gpv_Page");
s.t();
This code produces a server call where pageName is “Home” and prop7 is not set. However, the call to getPreviousValue stores the value of pageName in the gpv_Page cookie. Assume that immediately afterwards, on the same page, the following code runs:
s.pageName = "New value";
s.prop7 = getPreviousValue(s.pageName,"gpv_Page");
Since the t() function does not run in this code block, another image request is not sent. However, when the getPreviousValue function code runs this time, prop7 is set to the previous value of pageName (“Home”), then stores the new value of pageName (“New value”) in the gpv_Page cookie. Next, assume the visitor navigates to a different page and the following code runs on this page:
s.pageName = "Page 2";
s.prop7 = getPreviousValue(s.pageName,"gpv_Page");
s.t();
When the t() function runs, it creates an image request where pageName is “Page 2” and prop7 is “New value”, which was the value of pageName when the last call to getPreviousValue took place. The prop7 value of "Home" was never contained in an image request, even though “Home” was the first value passed to pageName.