: 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
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?
More posts by @Cofer257
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.