AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.8K members online now
4.8K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How to track urls that contain "#" ?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Everybody, 

Since a few days I'm stuck with a tracking issue. 

I noticed that analytics don't track URL's that contain "#",

Here are some exemples: 

https://www.fido.ca/pages/#/login?m=login

https://www.rogers.com/web/totes/#/signin

 

Have you ever experienced this kind of problem ? Is there any way to solve this issue? 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Oualid C
February 2016

Re: How to track urls that contain "#" ?

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆
Hi!
You need to modify your tracking code to send full path with hash parameter.

If you use Universal Analytics syntax replace this line:
ga("send","pageview");
with this:
ga("send","pageview",window.location.pathname + window.location.search + window.location.hash);

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Oualid C
February 2016

Re: How to track urls that contain "#" ?

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆
Hi!
You need to modify your tracking code to send full path with hash parameter.

If you use Universal Analytics syntax replace this line:
ga("send","pageview");
with this:
ga("send","pageview",window.location.pathname + window.location.search + window.location.hash);

Re: How to track urls that contain "#" ?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
thank you