Pathnames instead of full urls

Avatar

Avatar
Level 1
bernardbaltazat
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
bernardbaltazat
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
bernardbaltazat
Level 1

19-11-2019

I'd like all my data collection query parameters which contain urls to be shortened only to pathnames (e.g. pev1 to be changed from "https://example.com/subpage" to  "/subpage"). I know I can set s.pageURL to change the "g" parameter, but what about others? Is there any way to overwrite e.g. "pev1" or "oid" parameters?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Applaud 500
MVP
Asheesh_P
MVP

Likes

130 likes

Total Posts

334 posts

Correct reply

145 solutions
Top badges earned
Applaud 500
Affirm 100
Contributor
Boost 100
Give Back 10
View profile

Avatar
Applaud 500
MVP
Asheesh_P
MVP

Likes

130 likes

Total Posts

334 posts

Correct reply

145 solutions
Top badges earned
Applaud 500
Affirm 100
Contributor
Boost 100
Give Back 10
View profile
Asheesh_P
MVP

20-11-2019

Option1:

DTM - Go to *`Property`* > **[ Edit Tool]** > Link Tracking and disable "Keep URL Parameters"

Option 2:

DTM - Go to link tracking rule > use custom code in place of UI

Add following code in custom code with in rule

var linkName = _satelite.getVar("Link PathName") //scrape href and convert to pathname in data element.

s.tl(this,'o', linkName);

Thanks,

Asheesh