migrating from analytics.js to gtag.js

雨燕双飞 提交于 2019-12-22 09:39:26

问题


How would you migrate a ga create command that uses the allowLinker and siteSpeedSampleRate parameters to the gtag config command?

ga('create' 'UA-1234567-25', 'auto', {'allowLinker': true,'siteSpeedSampleRate': 100 });


回答1:


"linker" will allow you to accept incoming cross domain. "site_speed_sample_rate" will allow you to adjust the site speed sampling rate.

  gtag('config', 'UA-1234567-25', 
    {
      'linker': {'accept_incoming': true},
      'site_speed_sample_rate': 100
    });


来源:https://stackoverflow.com/questions/52494520/migrating-from-analytics-js-to-gtag-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!