Google Analytics pageTracker is not defined?

前端 未结 4 438
遥遥无期
遥遥无期 2021-01-30 11:21

Little bit confused... I am trying to track mailto links being clicked, but constantly \'pageTracker is not defined\' is shown. I have the following code just before my end bod

4条回答
  •  隐瞒了意图╮
    2021-01-30 11:30

    The new Async Google Analytics code (that you're using) works a bit differently than the non-Async. Any time that you want to call a method on pageTracker you simply push a "message" onto the "_gaq" queue.

    hello@mydomain.co.uk
    

    Although, tracking a mailto link may work better as an event:

    hello@mydomain.co.uk
    

    For more info take a look at the Async Tracking Users Guide.

提交回复
热议问题