Splitting Traffic

Unlike our other integration methods, splitting traffic with Standalone happens clientside.

Using the ezstandalone.isEzoicUser function, you can split traffic on a percentage of your traffic.

Like the traffic splitting in our regular integration the isEzoicUser function splits based on a user's session, not pageviews.

Example

Below is an example of splitting 50 percent of your traffic with Ezoic.

 1<script type="text/javascript">
 2    ezstandalone.cmd = ezstandalone.cmd || [];
 3    ezstandalone.cmd.push(function() {
 4        var percentageToRunEzoic = 50;
 5        if(ezstandalone.isEzoicUser(percentageToRunEzoic)) {
 6            ezstandalone.define(100,101);
 7            ezstandalone.enable();
 8            ezstandalone.display();
 9        } else {
10            // Normal ad code execution
11        }
12    });
13</script>