Inkcite 1.18.3

A/B Testing and Versioning

Inkcite makes it simple to create multiple versions of your email either because you want to A/B test something or because you want to target specific recipient segments. Working from the same source file means less errors and less repetition.


Start by adding the versions section to your project’s config.yml. Add unique, human-readable names for each version of your email you would like Inkcite to produce. There is no limit to the number of versions you can define.

# Name all of the possible variants of your email here.
  - customer
  - prospect

Version names can not include spaces. Use an underscore (_) rather than spaces if your version name requires more than one word - e.g. abandoned_cart or ordered_last_30_days.

Specifying Content for a Specific Version

Version-specific content is controlled using encapsulated Ruby (ERb). Although this allows you to use the full power of the Ruby programming language within your emails, the most common use-case is to add or remove content based on the version. For example:

We're proud to announce the release of ACME Widget Bedazzler 2.0!
  <% if customer? %>
    <!-- Will appear in the customer-specific version of the email. -->
    Upgrade today for only $19.95!
  <% else %>
    <!-- Will appear in the prospect version of the email. -->
    Introductory priced at $59.95!
  <% end %>

Previewing Versions In-Browser

Without any command line parameters, the Inkcite server will display the first version specified by default. In our example, that would be the customer version of the email. You can specify the version of the email you’d like to see in your browser like this:

inkcite server --version prospect

If the Inkcite server is already running, you can dynamically change to a different version right inside of your browser by changing the URL. Include version=(VERSION NAME) as a query parameter to request a new version. For example: or

Inkcite accepts v as shorthand for the version parameter - e.g. -v (VERSION NAME) and v=(VERSION NAME)

Previewing Versions in an Email Client

When Inkcite sends email previews, it automatically sends a separate email for each defined version. Add the {version} tag to your project’s subject line (in source.tsv) to make the emails clearly identifiable in your inbox.

subject: Introducing our new product! [{version}]

Send your email preview to the appropriate distribution list like you normally do:

inkcite preview internal

After Inkcite has uploaded any new or updated images to your public CDN, it will send two or more emails to the recipients (depending on how many versions you have declared). Checking your email, you will see something like this:

Introducing our new product! [customer]
Introducing our new product! [prospect]