Analytics
1.5K members online now
1.5K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Client ID URL Corruption

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey everyone,

 

I am very concerned about launching a new feature on our website and how it is going to effect our Analytic data... Our developers have structured our URL's to display our clients account number as the first page path when they are logged in (ex www.website.com/12345) with 12345 equaling the client account number/user id. This means that if they go to our about page while logged in the URL will display www.website.com/12345/about. The big concern is that most of our visitors will be logged into their accounts while they are logged into our website so there could be 1,000's of "about" pages displayed on our analytics account because of the user id's... I do not want to have to do an advanced search each time I want to see specific page views and such. The complexity of our website does not allow us to change the user id URL functionality so I am wondering if anyone has any ideas for filters or anything so this doesn't corrupt our future data?

 

Thanks in advance!

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Schaeffer W
August 2016

Re: Client ID URL Corruption

Top Contributor
# 2
Top Contributor

Hi Schaeffer W :-)
You will need to test this so if you do not already have a View created for testing, pls do create one.
Then create and apply the following filter
Custom Advanced Filter
Field A -> Extract A > Request URI > about$
Field B -> Extract B leave it the empty
Output To -> Constructor > Request URI > /about

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Schaeffer W
August 2016

Re: Client ID URL Corruption

Top Contributor
# 2
Top Contributor

Hi Schaeffer W :-)
You will need to test this so if you do not already have a View created for testing, pls do create one.
Then create and apply the following filter
Custom Advanced Filter
Field A -> Extract A > Request URI > about$
Field B -> Extract B leave it the empty
Output To -> Constructor > Request URI > /about

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Client ID URL Corruption

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you for replying to this post with a possible solution! I am in talks with our developers to implement this very soon.

Re: Client ID URL Corruption

Rising Star
# 4
Rising Star
Hey Schaeffer,

@Bronwyn V gave you some great advice for your about pages. I wanted to add one thing to the discussion for future viewers of this post, and that is to consider shaping the hit properly before it gets to GA.

The preferred method would be for your developers to take a different approach Smiley Happy If they want it in the URI for whatever reason a parameter based approach e.g. id=123456 is much easier to clean up from all your page paths via a simple view setting to exclude parameters.

That said, it's hard to stop that train once it leaves the station so you could also use Google Tag Manager and a Custom JavaScript variable to restructure the "page" setting in "fields to set" and remove the extraneous data before it's even sent to GA. Your developers can also do this by dynamically passing same into the send 'pageview' method. You may want to ask them to set the account id as a custom dimension or as the UserId at the same time.

Some resources from whomever is interested:

User ID
https://support.google.com/analytics/answer/3123662?hl=en

Custom Dimensions

https://support.google.com/analytics/answer/2709828?hl=en

Pageview customization

https://developers.google.com/analytics/devguides/collection/analyticsjs/pages#modifying_page_urls

(Strangely they have some sample code that is similar to what you need)


Again, Bronwyn is exactly spot on that you can do this with filters, just wanted to mention that you can attack this on the other side before the hit is sent to GA. Smiley Happy


Best,

Theo Bennett





Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn