Implementing the code

Once you’ve designed your experiments, and completed the preparatory steps in the Myna dashboard, it’s time to start playing with the code.

Before you begin this step, you should make sure that you have:

  • the ability (and authority) to edit the code of your website
  • prepared your experiments and have your variants to hand
  • a Myna account


The heart of Myna is a simple REST API. There are two main end-points that you can call:

  • suggest - You send an experiment ID (the UUID from your Dashboard) to Myna, and we give you back a suggestion (the name of a variant from your dashboard) and a token that you can use to reward the suggestion;

  • reward - If a user performs your goal action, you can call this end-point to reward the suggestion. You send Myna the reward token and we make sure future suggestions favour that variant a little more.

Full documentation is available on the Myna REST API page.

Client Libraries

To simplify integration, we have client libraries available in several popular programming languages.

Check the sidebar for links to guides and code samples.

Language / platform Myna client Author
HTML Myna for HTML The Myna Team
Javascript Myna JS The Myna Team
Javascript Enggano Scott Arbeitman
PHP Myna PHP Alex Gordon of Fileability
Ruby Myna Eventmachine The Myna Team
Python (beta) Myna Python The Myna Team
Wordpress Myna for Wordpress Cliff Seal

We’re adding more libraries all the time, so if your language is missing from the list, get in touch and let us know what you need.

If you’re developing a Myna client library using our API, let us know and we’ll list it here.