Explaining Google Analytics async tracker

前端 未结 2 748
不思量自难忘°
不思量自难忘° 2021-01-05 07:45

I have a as to how google\'s async analytics tracker works. The following code is used to init a command array:



        
2条回答
  •  有刺的猬
    2021-01-05 07:51

    Yep. Javascript contexts are thrown away on page reload, so if the user leaves the page before ga.js loads, those hits are lost. The advantage of the async version of GA is that it can be put higher in the page, which means it's much more likely to have ga.js load before the user leaves.

提交回复
热议问题