Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Common Plugins Get Previous Value and New/Repeat Visitor Implementation

Avatar

Avatar
Validate 1
Level 1
KMahesh
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
KMahesh
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
KMahesh
Level 1

10-05-2021

I have installed the 'Common Analytics Plugins Extension'


Created a Rule - Initialize Plugin's

KMahesh_0-1620638653994.png

and another Rule - Initialize Time Plugin

KMahesh_2-1620638846743.png

and in-browser console I am getting the function definitions as well.
This always returning the NEW instead of repeat.

KMahesh_1-1620638806263.png

 

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.

 

 

s.prop9 = s.getPreviousValue(s.pageName,'gpv_pn');
s.linkTrackVars = "prop9";

 

 

 

Tried the Alternative approach as well.

Created one Common Plugin Rule and disabled the above two rules - 

 

KMahesh_3-1620639659007.png

 

then added the required things 

KMahesh_4-1620639705232.png

 

getting the same result in the console as well, but the gpv_pn cookie not dropping on the page

KMahesh_5-1620639744624.png

KMahesh_6-1620639787144.png

Please let me know if I missed something.

 

Thanks in advance.

 

 

 

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Establish
Level 2
Charles_Thirupathi
Level 2

Likes

16 likes

Total Posts

36 posts

Correct Reply

7 solutions
Top badges earned
Establish
Validate 1
Shape 1
Give Back
Boost 5
View profile

Avatar
Establish
Level 2
Charles_Thirupathi
Level 2

Likes

16 likes

Total Posts

36 posts

Correct Reply

7 solutions
Top badges earned
Establish
Validate 1
Shape 1
Give Back
Boost 5
View profile
Charles_Thirupathi
Level 2

10-05-2021

@PratheepArunRaj Thanks for Adding me in.

@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.


Thanks,
Charles