Integration with other Testing Packages/Server-side Testing

What if you are already using an existing A/B testing package and want to integrate those experiments with KISSmetrics? Or what if you want to run your experiments server-side? Luckily this is simple to do. You just need to do two things:

1) Tell KISSmetrics about the experiment

Call KM.set with the name of the experiment and the selected variant. Assume you have a server-side variable @color that your A/B testing package set. You’ll need to tell KISSmetrics about that:

<script>
  _kmq.push(["set", {"Signup Button Color": "<%= @color %>"}]);
</script>

2) Record your KISSmetrics events as normal

Just make the standard API calls to KISSmetrics to record your events. For example:

<script>
  // Record the button click with KISSmetrics
  _kmq.push(["record", "Viewed Homepage"])
</script>

Or:

<script>
  // Record the button click with KISSmetrics
  _kmq.push(["trackClick", "signup_button", "Clicked Signup"])
</script>

Other notes

Keep in mind that KISSmetrics is assuming your A/B testing package is taking care of:

There a few advantages to running a server-side A/B testing package. The primary advantage is that you can output only the HTML you need for the selected variant which can all be done server-side. This can reduce your page size and offer a better user experience. With a Javascript based solution you must contain logic to display all variants with each request and only display the selected variant once this Javascript code executes. The primary disadvantage of a server-side package is that, depending on the implementation, it can be limited to just cookies for remembering which variants your users see. With a Javascript-based solution there are more technologies that do a better job at this than cookies can do alone.

Search


Learn more about KISSmetrics

Get started now