如何使用谷歌分析和AJAX跟踪不同的按钮点击?

时间:2022-05-11 15:21:53

I have several pages, let's call them A, B and C.
Each of these pages has a form where the user can type in some information and click a button to send those information to the server. This button click is performed in an UpdatePanel to prevent a full postback.

我有几个页面,我们称它们为A、B和c。每个页面都有一个表单,用户可以在其中输入一些信息并单击一个按钮将这些信息发送到服务器。此按钮单击将在UpdatePanel中执行,以防止完全回发。

A customer of ours now wants to know how many % of the using visiting each site (A, B and C have different URLs) use this form. (Meaning I need seperate values for A, B and C)
How to I track this in Google Analytics? It seems that I have to create a conversion(??) for each page. Is that correct?

我们的一个客户现在想知道访问每个站点(A、B和C有不同的url)的使用百分比是多少。(意味着我需要A、B和C的分离值)如何在谷歌分析中跟踪它?似乎我必须为每个页面创建一个转换(??)那是正确的吗?

How must I modify the existing web application to let Google Analytics know, that a user submitted the form. (without the need to redirect thank to xy amount of different thank you pages)

我必须如何修改现有的web应用程序,以便让谷歌分析知道,用户提交了表单。(不需要重定向感谢的xy数量,谢谢你的页面)

The only piece of information I've found so far is this: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55519 Unfortunately, this FAQ entry does not cover my answer.

到目前为止,我找到的唯一信息是:http://www.google.com/support/googleanalytics/bin/answer.py?不幸的是,这个常见问题解答条目没有涵盖我的答案。

2 个解决方案

#1


4  

A project i have released allows for easy integration with Google Analytics to fire page views and events through native .net code.

我发布的一个项目允许与谷歌分析轻松集成,通过本机。net代码触发页面视图和事件。

This way you can simply call a method that will log either and event or a page view for you. You can do this in your web service's code.

通过这种方式,您可以简单地调用一个方法,该方法将为您记录事件或页面视图。您可以在web服务的代码中这样做。

It's called GaDotNet and can be found here: http://www.diaryofaninja.com/projects/details/ga-dot-net

它叫做GaDotNet,可以在这里找到:http://www.diaryofaninja.com/projects/details/ga-dot-net

This library really just is a wrapper for sending requests to the Google tracking pixel (example url below).

这个库实际上只是一个用于向谷歌跟踪像素发送请求的包装器(下面的示例url)。

http://www.google-analytics.com/__utm.gif?utmwv=4.6.5&utmn=488134812&utmhn=facebook.com&utmcs=UTF-8&utmsr=1024x576&utmsc=24-bit&utmul=en-gb&utmje=0&utmfl=10.0%20r42&utmdt=Facebook%20Contact%20Us&utmhid=700048481&utmr=-&utmp=%2Fwebdigi%2Fcontact&utmac=UA-3659733-5&utmcc=__utma%3D155417661.474914265.1263033522.1265456497.1265464692.6%3B%2B__utmz%3D155417661.1263033522.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B

#2


0  

You need to call pageTracker._trackPageview with a unique string when the button is clicked using Javascript.

你需要调用pageTracker。使用Javascript单击按钮时具有唯一字符串的_trackPageview。

For more precise instructions, please provide more detail.

如需更精确的说明,请提供更多细节。

#1


4  

A project i have released allows for easy integration with Google Analytics to fire page views and events through native .net code.

我发布的一个项目允许与谷歌分析轻松集成,通过本机。net代码触发页面视图和事件。

This way you can simply call a method that will log either and event or a page view for you. You can do this in your web service's code.

通过这种方式,您可以简单地调用一个方法,该方法将为您记录事件或页面视图。您可以在web服务的代码中这样做。

It's called GaDotNet and can be found here: http://www.diaryofaninja.com/projects/details/ga-dot-net

它叫做GaDotNet,可以在这里找到:http://www.diaryofaninja.com/projects/details/ga-dot-net

This library really just is a wrapper for sending requests to the Google tracking pixel (example url below).

这个库实际上只是一个用于向谷歌跟踪像素发送请求的包装器(下面的示例url)。

http://www.google-analytics.com/__utm.gif?utmwv=4.6.5&utmn=488134812&utmhn=facebook.com&utmcs=UTF-8&utmsr=1024x576&utmsc=24-bit&utmul=en-gb&utmje=0&utmfl=10.0%20r42&utmdt=Facebook%20Contact%20Us&utmhid=700048481&utmr=-&utmp=%2Fwebdigi%2Fcontact&utmac=UA-3659733-5&utmcc=__utma%3D155417661.474914265.1263033522.1265456497.1265464692.6%3B%2B__utmz%3D155417661.1263033522.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B

#2


0  

You need to call pageTracker._trackPageview with a unique string when the button is clicked using Javascript.

你需要调用pageTracker。使用Javascript单击按钮时具有唯一字符串的_trackPageview。

For more precise instructions, please provide more detail.

如需更精确的说明,请提供更多细节。