整个网站永久网址查询字符串?字符串、网址、网站

由网友(Soren 索伦)分享简介:这是那些情况下,我觉得有就在我面前一个简单的答案之一... ...希望你们/加尔斯能告诉我光。This is one of those situations where I feel like there is a simple answer right in front of me...hopefully you...

这是那些情况下,我觉得有就在我面前一个简单的答案之一... ...希望你们/加尔斯能告诉我光。

This is one of those situations where I feel like there is a simple answer right in front of me...hopefully you guys/gals can show me the light.

问题:

我有一个希望保持跨在其网站上的所有网页的查询字符串,只要他们通过一个包含查询字符串中的链接到达现场的客户。

I have a client that wants to maintain a query string across all pages on their site, only if they arrived at the site via a link that contains the query string.

此查询字符串还需要与站点中的任何外部链接通过。

This query string would also need to be passed with any external link from the site.

信息:

查询字符串的一个例子:

An example of the query string :

utm_medium =< ad_placement>&安培; utm_source =< ad_source>

(显然,这是从广告跟踪转化)

(Obviously this is for tracking conversions from ads)

我们正在通过谷歌分析(所以,是的,我知道这是一个二选一)目前跟踪所有这些东西,这是报告的一个额外层。

We're currently tracking all this stuff via Google Analytics (so, yes, I know that's an alternative), this is for an extra layer of reporting.

我没有code自己的网站,这带来了它自己的一系列问题(例如:我什至不知道他们使用的所有页面之间的公共头) - 所以我希望有一个KISS的答案了有这一点。

I did not code their site, which brings it's own set of issues (example: I'm not even sure they use a common header among all pages) - so I'm hoping there is a KISS answer out there for this.

有什么建议?

推荐答案

所以 - 在这里的回答是这样的:

So - the answer here was this :

使用JS抢查询字符串 验证查询字符串 添加到一个cookie 追加cookie'd查询字符串中的DOM 每一个HREF Use JS to grab the query string Validate the query string Add to a cookie Append the cookie'd query string to every href in the DOM

就像我说的......我知道有一个简单的例子盯着我的脸,哈哈!

Like I said...I knew there was a simple example staring me in the face haha!

阅读全文

相关推荐

最新文章