Splitting Traffic

Unlike our other integration methods, splitting traffic 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.showAds(100,101);
 7        } else {
 8            // Normal ad code execution
 9        }
10    });
11</script>