會自動追滿多事件 還有 ajax call 的瀏覽量 我到今天才知道 囧
SPA pageview 寫法
ga('set', 'page', location.pathname); ga('send', 'pageview');
While technically the send command for pageview hits accepts an optional page field as the third parameter, passing the page field that way is not recommended when tracking single page applications. This is because fields passed via the send command are not set on the tracker—they apply to the current hit only. Not updating the tracker will cause problems if your application sends any non-pageview hits (e.g. events or social interactions), as those hits will be associated with whatever page value the tracker had when it was created.