Asp.net 如何跟踪googleplusone按钮的点击?
我想在不使用谷歌分析的情况下跟踪谷歌的点击量。是否有任何功能可用于此?我试着用谷歌搜索,但没用 更新:我试过了,但是回调没有被触发Asp.net 如何跟踪googleplusone按钮的点击?,asp.net,google-plus-one,Asp.net,Google Plus One,我想在不使用谷歌分析的情况下跟踪谷歌的点击量。是否有任何功能可用于此?我试着用谷歌搜索,但没用 更新:我试过了,但是回调没有被触发 <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script>
<script type="text/javascript">
function helloWorld(plusone) { alert('+1 Triggered, State=' + plusone.state); }
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<g:plusone callback="helloWorld"></g:plusone>
</div>
</form>
</body>
</html>
函数helloWorld(plusone){alert('+1已触发,State='+plusone.State);}
将+1标记上的回调属性设置为javascript函数
此函数在用户单击+1按钮后调用。回调函数必须位于全局命名空间中,并且可以接受单个参数,该参数将是具有以下结构的JSON对象:
{
"href": target URL,
"state": "on"|"off"
}
对于+1,状态属性设置为“开”,对于删除+1,状态属性设置为“关”。我尝试了此操作,但回调不起作用?见上文更新