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

Have s.clearVars clear pageName too!

Avatar

Avatar
Validate 1
Level 7
jkunz
Level 7

Likes

201 likes

Total Posts

33 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 7
jkunz
Level 7

Likes

201 likes

Total Posts

33 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
jkunz
Level 7

12-06-2018

It looks like currently s.clearVars clears just about everything BUT pageName:
function(){var c,b;for(c=0;c<a.g.length;c++)if(b=a.g[c],"prop"==b.substring(0,4)||"eVar"==b.substring(0,4)||"hier"==b.substring(0,4)||"list"==b.substring(0,4)||"channel"==b||"events"==b||"eventList"==b||"products"==b||"productList"==b||"purchaseID"==b||"transactionID"==b||"state"==b||"zip"==b||"campaign"==b)a[b]=void 0}

The problem is, on single page apps (which is probably the biggest use case for using clearVars), I need pageName cleared out as well.
For instance, I have some logic that sets the pageName based on the URL, but only if s.pageName hasn't already been set for that beacon. The problem is, if pageName is ever set, it hangs around, so it always looks like s.pageName is set, even if it wasn't set for that beacon. I'm having to run clear vars, THEN go in and manually clear out s.pageName as well.

This affects the Launch Adobe Analytics extension "clear vars" action as well, since that just uses the s.clearVars() function (from what I'm told).

Along the same lines, s.clearVars does not clear s.contextData either.  I suspect when people use clearVars, they want ALL variables to be cleared.

2 Comments

Avatar

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

153 likes

Total Posts

317 posts

Correct Reply

102 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

153 likes

Total Posts

317 posts

Correct Reply

102 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

12-06-2018

Good and useful feature request!

s.clearVars was a method to clear the variables. Earlier, it was mainly used to clear variables which was persisting in s.tl() calls (through s.linkTrackVars and s.linkTrackEvents).... since s.tl() calls didn't consider page names, we ignored that?

Just a wild guess..

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

27-10-2020

 
Status changed to: Archived