问题描述
当用户在我的网站上注册时,我希望能够存储他们是否通过AdWords广告系列访问我的网站。
我知道google会使用javascript来跟踪基于用户计算机上创建的cookie的转换。有没有一种方法可以检查这个cookie,以便我可以将源代码存储在用户帐户中?
- 您可以从Cookie中读取这些数据。
配置跟踪:
-
在AdWords帐户中关联您的AdWords帐户和GA
帐户: -
,转到我的
帐户>帐户首选项,请点击
跟踪
旁边的修改链接,然后选择显示
目标网址自动标记的框。
点击保存更改; 然后从您的AdWords帐户中点击
,点击分析标签并选择
分析设置>配置文件
设置>编辑配置文件信息;
选中应用成本数据,然后点击
保存更改
告诉它是否工作? GA存储数据的地方是什么?
获取最初的__utm.gif请求并查看Referer。附加到该网址的是一个新参数 gclid 。这是关键字特定的参数(对您的帐户唯一)。它是这个参数区分你的访客作为源自AdWord(即,谷歌(cpc))从谷歌(有机)这里是我刚刚抓住和匿名(搅乱数字/字母):
引荐来源:? gclid = CKr61p31yKACFZlg4wodjj3gbA
您会在同一个跟踪像素请求中的其他两个位置看到相同的字符串:
(i)作为当前页面的页面请求的GIF请求参数 utmp 的值,最重要的是; (ii)作为GIF请求参数 utmcc 的值 - cookies的容器。 包含adwords数据的特定cookie是 __ utmz ,它实际上是所有引荐数据的容器。这是一个匿名示例,我只是随意抓取了一些(即,我刚刚在Google中使用由显而易见的Adwords组成的查询进行搜索,然后单击搜索结果中的付费链接之一,然后只需拉动请求头):
When a user signs up on my site I want to be able to store whether or not they came to my site via an Adwords campaign.
I know google uses javascript to track conversions based on a cookie that is created on the users machine. Is there a way I can check this cookie so I can store the source against the user account?
You're correct--you can read this data from the cookies.
To configure the tracking:
connect your adwords and GAaccounts:
in your AdWords account, go to MyAccount > Account Preferences, clickthe "edit" link next to Trackingthen select the box that says"Destination URL Auto-tagging".Click "Save Changes";
still from your AdWords account,click the Analytics tab and chooseAnalytics Settings > ProfileSettings > Edit Profile Information;check "Apply Cost Data", then clickSave Changes
So how can you tell if it's working? And where does GA store the data?
Grab an initial __utm.gif request and look at the Referer. Appended to the URL is a new parameter "gclid." This is the keyword-specific parameter (unique to your account). It's this parameter that distinguishes your visitors as AdWord-originating (i.e., "google(cpc)") from "google(organic)" Here's one i just grabbed and anonymized (scrambled the numbers/letters):
Referer: http://www.adomainname.com/?gclid=CKr61p31yKACFZlg4wodjj3gbA
You'll see this identical string in two other places in the same tracking pixel request:
(i) as the value for the GIF Request Parameter "utmp" which is the page request for the current page, and, most importantly;
(ii) as the value for the GIF Requests Parameter "utmcc"--the container for the cookies. The specific cookie that holds the adwords data is __utmz, which is actually the container for all referral data. Here's an anonymized example i just grabbed more or less at random (i.e., i just did search in Google using a query comprised of obvious Adwords and then clicked one of the paid links in my search results, then just pulled the Request Header):
这篇关于如何捕获访客是否来自谷歌AdWords的点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!