regex - 在Google Analytics(分析)过滤器中使用正则表达式重写某些URL

标签 regex filter google-analytics universal-analytics

我该如何改写

/product-category-xyz/prefix-product-name-and-model


进入

/prefix/product-category-xyz/product-name-and-model


以便在“内容细化”报告中更轻松地报告?

最佳答案

一种可能的解决方案

正则表达式:

(.*\/)(.*?)-(.*)


替代:
/ \ 2 \ 1 \ 3

演示:
http://regex101.com/r/zD6iJ3/1

关于regex - 在Google Analytics(分析)过滤器中使用正则表达式重写某些URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25910304/

相关文章:

android - Android Release + Firebase + Google Tag Manager + Google Analytics 的 ecommerce_purchase 问题

javascript - 如何使用正则表达式(Regex)从字符串中获取电话号码?

SQL 查询 : How to check if a particular record had more alphabets than numbers and return that

jquery过滤不会在选择类别的情况下向左浮动

dynamic - 基于过滤器的 Spotfire 计算列

google-analytics - Google Analytics(分析)中的Measurement Protocol事件没有出现

regex - 如何在正则表达式中包含双引号(“)

带有正则表达式的 Java 流过滤器不起作用

opengl - OpenGL Mipmapping:OpenGL如何确定 map 级别?

https - 为什么谷歌分析 JavaScript 文件无法加载?