我使用如下使用mixpanel的JavaScript API代碼:mixpanel track_links追蹤不正確
$(function() {
mixpanel.track_links("a[href~='/posts/more']", "Show more posts.",
{ "topic_id": "<%= @topic.id.to_guid %>" });
});
這似乎並沒有工作。我已經嘗試了沒有單引號的變體無濟於事。
$(function() {
mixpanel.track_links("a[href~=/posts/more]", "Show more posts.",
{ "topic_id": "<%= @topic.id.to_guid %>" });
});
上面的代碼有問題嗎?
下面的鏈接頁面上:
<a href="/posts/more?i=20&id=0a5cb302-859e-11e1-8851-24c603d12b60&type=Topic" data-remote="true">Show More...</a>
當我點擊它時,不會觸發事件。
你的選擇正確嗎?當你嘗試'$(「a [href〜=/posts/more]」)''時,你會得到一個結果嗎? – diaho 2012-05-23 22:17:39