google analytics and pinterest event tracking

i wanted to get some opinions on the best way to track pining events as of today(11/30/12). It's my understanding pinterest is working on an api that will hopefully have real callbackmethods like fb or twitter does for it's buttons to tie into google analytics. but as of now, we have to work around best we can. currently i wrap my pinterest link in a div, so after pinit.js does it's thing and creates the actual button, the html looks like this: my thought is to use jQuery to add in the track events on the pin `div` like so $(document).ready(function() { $('div.pin').click(function() { _gaq.push(['_trackEvent', 'Pinterest Pins', 'Article Pin', $(location).attr('href')]); }); }); I know it doesn't 100% know that the user actually went through with the pinning process, but I'm not really sure what else to do than wait for a better api? does this sound like a good way to do it for now to get some event tracking going in ga? or does anybody have some suggestions or tips on a better solution?
You should be using _trackSocial instead.

以上就是google analytics and pinterest event tracking的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏