Google Analytics hitCallback event tracking not working

后端 未结 1 1381
说谎
说谎 2021-01-12 19:20

I am trying to track a link being clicked using event tracking and hitcallback. My analytics code looks like this...



        
1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 19:42

    The problem is you are attempting to use Universal Analytics syntax (analytics.js) for your click tracking, but the GA library you are using is the older _gaq (ga.js) syntax.

    _gaq style does let you specify a callback function, though it's undocumented. Basically you have to _set the callback function before you make the _trackEvent call.

    Your link should look like this:

    cool
    

    0 讨论(0)
提交回复
热议问题