Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



56 Commits

Repository files navigation

Tweeker Embed Code

Simple a/b and multivariate testing

The embed code for Tweeker that you include on your page template.

It's an ES6 Javascript library that talks to the Tweeker API to pull in your variant and goal data and display it to your users.

It uses localStorage to save variant and goal data locally so that your users get a consistent experience, and also save on bandwidth.


Visit to get your embed code. It will look something like this:

  window.TweekerSettings = {
    businessId: YOUR_BUSINESS_ID

    var i, e, d = document, s = "script";i = d.createElement("script");i.async = 1;
    i.src = "";
    e = d.getElementsByTagName(s)[0];e.parentNode.insertBefore(i, e);

It basically just adds the javascript to the end of your </head> tag.

The contents of are generated by this library.