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.2K members online now
4.2K 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

Website traffic routed via /index.php - How to better capture Flow?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I have taken over product management of an online web application. Google Analytics was added to the site some years ago, but it was never setup correctly.

 

I am trying fix things, but I am unsure how to proceed with one main point. All pages on the application are routed through one .php file: index.php. The application decides which content to load using a string parameter in the URL.

 

In the examples below, the 'c' variable determines where the user currently is within in the app and loads the appropriate controllers and views accordingly:

 

Welcome Page: /index.php/?c=home.welcome

Applications List Page: /index.php/?c=apps.app_list

Application Details Page: /index.php?c=apps.view&id=12345

Workflow Page: /index.php?c=workflow.primary.application?id=67890

 

You get the picture. As a result of this, the User Flow screen in google analytics is almost unreadable. The following is a screenshot that displays the Group Details of one flow section.

 

User Flow - /index.php

 

How can I set this up properly? Should I use filters in some way?

 

I considered using virtual pageviews, but I wasn’t sure if that was the best option. I guess, essentially, in our GA js code, we’d have to dynamically create a pageview based on every ‘c’ variable. So, c=home.welcome could translate into a pageview url of /home/welcome and the title of the page could be “Home - Welcome”...or something to that effect.

 

What do you think?

 

Thanks for any input! I’m not the best with analytics, so any help is appreciated.

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Chris M
November 2015

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 4
Top Contributor
It is possible to rewrite the URLs using Advanced filters and Regex. This can affect your goals, filters, segments... I suggest setting up a test property and working there until you're satisfied with the results.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 2
Top Contributor
Hi Chris,

As I see you only need the "c" parameter to identify the pages. You need the add the query parameters you don't want to see in the reports to "Exclude URL Query Parameters" in the View Settings. Enter them as a comma separated list.

Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Website traffic routed via /index.php - How to better capture Flow

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I did a google image search of appropriate user flows, and I'm getting a better idea of what I should be seeing! I definitely do need to filter out all the unnecessary query parameters, which might be a lot.

However, is there a way to translate things to make the pages more readable? For example, I don't want to see that the user flowed from /index.php?c=home.welcome to /index.php?c=apps.apps_list. I would much rather see one of the following:

a) /home/welcome to /apps/app_list, or b)
b) /c=home.welcome to /c=apps.apps_list (removing the unnecessary index.php)

Are either of these possible?

Thanks!
Marked as Best Answer.
Solution
Accepted by topic author Chris M
November 2015

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 4
Top Contributor
It is possible to rewrite the URLs using Advanced filters and Regex. This can affect your goals, filters, segments... I suggest setting up a test property and working there until you're satisfied with the results.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 5
Top Contributor
Hi Chris,

first, if you're mainly interested in analyzing user paths across your site independently of your user's referring source, you may go for the Behavior Flow report (under "Behavior') instead. There are "Pages and Events" and "Automatically grouped pages" views of that report.

I guess what you really need here, however, is Analytics Content Grouping [1] for your purposes. Probably, "Group Using Rule Definitions" will fit best for you. In that way, you can define and name page types as you want them.

For example, you may define "Application Details Pages" with a reguar expression

^/index\.php\?c=apps\.view&id=

In that way, all the apps-view pages with different ids are put together in that single group.

The main advantage is that you can use this custom grouping then in your behavior flow report instead of the page URLs which might be way easier to work with.

Christoph

[1] https://support.google.com/analytics/answer/2853423?hl=en

Re: Website traffic routed via /index.php - How to better capture Flow

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

This was what I needed to be thinking about. I actually did accomplished this via a simple Search and Replace on the Request URI. So, ^\/index\.php\/?\?c= was replaced with /

 

Now I am information presented as /app_list.list or /home.updates. It's not perfect, but being able to remove /index.php has broken out the user flow in much more visible manner.

Re: Website traffic routed via /index.php - How to better capture Flow

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Thanks for the detailed response. I believe this is my next step. In my other response, I noted how a Search and Replace filter met my needs. However, grouping pages together that share similar query parameters (like id) will help a lot.

 

I was hoping I could mark both answers as the accepted solution, but the forum only allows one. Thanks though!

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 8
Top Contributor
Hi Chris,

you're welcome (there are stars you might give if a solution helps you :-)

Note that a major drawback of a search-and-replace filter solution is that all page URLs and hereby all Analytics reports containing URLs are changed and simplified permanently. So, according to the extent of changes issued some page information is permanently lost in your data. Grouping may be more gentle in terms of data quality.

Christoph

Re: Website traffic routed via /index.php - How to better capture Flow

[ Edited ]
Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Thanks for the clarification on things.

I am unsure if Content Grouping specifically meets our needs. While I can create content groups for the main, most important sections of our website, all of the other pages will remain as outliers without a content group. They'll still have /index.php? etc attached to it. Also, google only allows a maximum of 5 content groups.

I do agree with the drawback you presented. Truly, it's a poor design of the web application itself. The tradeoff is permanently checking the data to make it readable and parsable by google versus keeping the data pure and presented as a total mess on the analytics side.

All of that said, I created a new view just to try out the Content Grouping. Let's see what happens over the next 24 hours!

PS: I have no idea how stars are supposed to work. Apparently I can only give 1?

Re: Website traffic routed via /index.php - How to better capture Flow

Top Contributor
# 10
Top Contributor
Hi Chris,

You don't need Content Grouping.

By excluding the query parameters you don't want to track separately the URLs will be grouped automatically.

From your example:

/index.php
/index.php?next_page=/index.php?c=home.updates

Both will be tracked as /index.php

If you also rewrite /index.php to / they will be tracked as /

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital