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

Set Previous Page Variable for 404 pages when source is external to owned site.

Avatar

Avatar
Validate 1
Level 2
soumiaz
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

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

Avatar
Validate 1
Level 2
soumiaz
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
soumiaz
Level 2

18-10-2017

Hello.

     I am trying to find the best way to track the the previous page URL for 404 pages when the source is external to my owened site. To find the previous page URL , I set a variable using JavaScript via Dynamic Tag Manager:

var ex=document.referrer

which allows me to get the previous page URL, however this function does not always work as sometimes the link comes from external sources (email, banner, google search ...)

What is the best way to proceed. 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
Issao_Shoji
Level 2

Like

1 like

Total Posts

13 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
Affirm 5
Affirm 3
View profile

Avatar
Validate 1
Level 2
Issao_Shoji
Level 2

Like

1 like

Total Posts

13 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
Affirm 5
Affirm 3
View profile
Issao_Shoji
Level 2

19-10-2017

Hello,

If your metric its really working as well, you can create a segment that: your "eVar" does not contain "your domain" the operator: "Then After 1 Page view" Entry page=/404. Do not forget to choose the option: "Only before the sequence". There's an example:

1328493_pastedImage_3.png

So, after that you can go to workspace and use your segment, with your eVar, that you still need to filter the data, using "Does not contain: mycompany.com" (This is important). To have a better comparison, you can use the metric "Ocurrences" in the side:

1328500_pastedImage_6.png

As you can see there's no relevance in external links to 404 error in my company website.

Regards,

Mauricio Shoji

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
soumiaz
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

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

Avatar
Validate 1
Level 2
soumiaz
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
soumiaz
Level 2

20-10-2017

Sounds good Issao Shoji​ . I will be doing that and I used the following documentation in order to store the previous pagename value in a cookie.

Thanks for your help.