【问题标题】:how to track googleplusone button clicks?如何跟踪 googleplusone 按钮的点击次数?
【发布时间】:2011-12-01 02:20:27
【问题描述】:

我想在不使用谷歌分析的情况下跟踪 googleplusone 点击。有没有可用的功能?我尝试用谷歌搜索,但无济于事。

更新:我试过了,但没有触发回调?

<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>

【问题讨论】:

    标签: asp.net google-plus-one


    【解决方案1】:

    您将 +1 标记上的回调属性设置为 javascript 函数。

    这个函数在用户点击+1按钮后被调用。回调函数必须在全局命名空间中,并且可以接受单个参数,该参数将是具有以下结构的 JSON 对象:

    {
      "href": target URL,
      "state": "on"|"off"
    }
    

    状态属性设置为“on”表示 +1,“off”表示移除 +1。

    【讨论】:

    • 我试过了,但是回调不起作用?见上面的更新
    猜你喜欢
    • 2013-06-29
    • 2015-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多