migrating from analytics.js to gtag.js
问题 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