替换URL以添加UTM代码(谷歌分析)

时间:2015-06-21 10:38:22

标签: coldfusion google-analytics

我希望在将内容保存到数据库时自动替换链接以添加UTM跟踪代码。我正在使用Coldfusion。例如:

 <p>So this is my sample text. 
 <a href="http://test.com/welkom">Click here</a> for the website. 
  <a href="http://test.com/news.cfm?news_id=10" class="test">Click here for the news</a>.

将其替换为:

    <p>So this is my sample text. 
    <a href="http://test.com/welkom?utm_campaign=test&utm_source=Email">Click here</a> for the website. 
    <a href="http://test.com/news.cfm?news_id=10&utm_campaign=test&utm_source=Email" class="test">Click here for the news</a>.

有人可以帮我这个吗?

0 个答案:

没有答案