HELP!!!2 version of links for same page in Pages report | Community
Skip to main content
xueqingz7821070
October 28, 2016
Solved

HELP!!!2 version of links for same page in Pages report

  • October 28, 2016
  • 2 replies
  • 711 views

Hi,

 

I am seeing two versions of link for the same page in Pages report under Site Content menu - for example:

http://www.myhome.com

myhome.com

There are two links for every page - one with http://www. and one without, it's making my page report a mess.

 

Please help!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gigazelle

Hi Xueqing, welcome to the community!

Your issue is directly related to data collection, likely because you do not have s.pagename defined. Due to this and due to how different browsers handle URLs, some include the protocol and subdomain while others do not. I would recommend altering the implementation on your site to make sure s.pageName is consistent. Commonly users will set the pageName to document.title, or use things like breadcrumbs to make it more descriptive.

If URL is what you're after, I'd recommend the following code:

s.pageName=location.hostname+location.pathname;

This will strip the protocol and query strings from the URL so they don't create separate line items. The bottom line however is that you are going to want to alter the implementation on your site - there's really no easy way around that.

2 replies

Gigazelle
Adobe Employee
GigazelleAdobe EmployeeAccepted solution
Adobe Employee
October 28, 2016

Hi Xueqing, welcome to the community!

Your issue is directly related to data collection, likely because you do not have s.pagename defined. Due to this and due to how different browsers handle URLs, some include the protocol and subdomain while others do not. I would recommend altering the implementation on your site to make sure s.pageName is consistent. Commonly users will set the pageName to document.title, or use things like breadcrumbs to make it more descriptive.

If URL is what you're after, I'd recommend the following code:

s.pageName=location.hostname+location.pathname;

This will strip the protocol and query strings from the URL so they don't create separate line items. The bottom line however is that you are going to want to alter the implementation on your site - there's really no easy way around that.

December 1, 2016

Hi Gigazelle,

 

Thanks for your reply! I'm pretty sure the s.pagename is set up already, however I'm still getting two line items.

Is it possible relating to angular java site?

 

Thanks again,

Olivia