我正在使用 mixpanel 的 javascript api 使用如下代码:
$(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>
当我单击它时,不会触发任何事件。