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

xueqingz7821070

28-10-2016

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!!

Accepted Solutions (1)

Accepted Solutions (1)

Gigazelle

Employee

28-10-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.

Answers (1)

Answers (1)

zhang_xueqing

01-12-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