Mobile app version of vmapp.org
Login or Join
Cofer257

: How to replace the path with a custom variable in the visitor flow? I would like to use Google Analytic's visitor flow to understand the behaviour of my visitors. My current visitor flow looks

@Cofer257

Posted in: #GoogleAnalytics

I would like to use Google Analytic's visitor flow to understand the behaviour of my visitors.

My current visitor flow looks like this:



As you can see, my URL structure is not really friendly to this tool, and thus I'm having a hard time extracting any useful information from there.

I've seen that analytics.js allows us to send custom variables, including overriding the path.

I guess that I could override the path to give all pages of the same type a common (fake) path, something like:

/restaurant/123/index => /restaurant
/restaurant/456/index => /restaurant

/restaurant/123/order => /order
/restaurant/456/order => /order


but I would be losing the potentially precious information that the original path represents.

Is it possible to send a custom variable to Google Analytics instead, and have the visitor flow use the custom variable instead of the path when displaying the above flow?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

Hopefully in the future this will be achievable with the recently launched page group feature, but right now I think you'll have to make a hack.

If preserving the original URL is important, I would recommend setting up a new view and then using filters to rewrite/aggregate the URLs.

AFAIK, you can't use custom dimensions in filters (yet), so you would have to set up a an advanced filter for each "type" of URL you want to rewrite.

For example:

Filter type: Advanced
Field A: Request URI
Field A pattern: ^/restaurant/d+/index
Output To: Request URI
Output To value: /restaurant
Field A required: Yes
Override Output Field: Yes


Now all pageviews to /restaurant/xxxxx/index will be aggregated under /restaurant in your new view, but still be reported with the proper URL in the old one.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme