Limit Google Optimize to 35% of loads (#98)
This commit is contained in:
parent
3fd1232b7e
commit
d865788438
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ function initializeBaseTracking() {
|
|||
wait++;
|
||||
if (window.ga && ga.create) {
|
||||
ga('create', '<%= ENV["GA_TRACKING_ID"] %>', 'auto');
|
||||
if (!checkUserLoggedIn()) {
|
||||
if (!checkUserLoggedIn() && Math.random() < 0.35) {
|
||||
ga('require', '<%= ENV["GA_OPTIMIZE_ID"] %>');
|
||||
}
|
||||
ga('send', 'pageview', location.pathname + location.search);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue