How to extend google analytics to track AJAX etc (as per H5BP docs)

前端 未结 2 1071
执念已碎
执念已碎 2020-12-30 12:12

I am trying to install the google analytics augments identified in the extend.md file of H5BP (https://github.com/h5bp/html5-boilerplate/blob/v4.3.

2条回答
  •  一生所求
    2020-12-30 12:41

    I have several ajax calls on my site. With Google Analytics Universal I use

    $.ajax({
        ...
        success: function (data) {
            ga('send','pageview','/virtual/....');
        },
        ...
    });
    

    Using of /virtual/ makes filtering easier if I want to separate date with or without ajax calls

提交回复
热议问题