{"_id":"54298c241215fe08007e0ff4","category":{"_id":"542979c51215fe08007e0ee9","project":"542979c51215fe08007e0ee5","version":"542979c51215fe08007e0ee8","__v":12,"pages":["542979c51215fe08007e0eeb","542ae00fcedcfc140004b81e","542abdb354d88d140075fbf2","542986467a6b690800767fb1","54298c241215fe08007e0ff4","54380adef1c23914006724b9","546287c18ba5620800710e4c","55e99381358d923700be988e","56328926df556c0d00cd0929","56421475b0dc090d00f8842c"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T15:24:53.471Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"parentDoc":null,"is_link":false,"project":"542979c51215fe08007e0ee5","user":"542979b61215fe08007e0ee4","version":{"_id":"542979c51215fe08007e0ee8","project":"542979c51215fe08007e0ee5","__v":4,"createdAt":"2014-09-29T15:24:53.437Z","releaseDate":"2014-09-29T15:24:53.437Z","categories":["542979c51215fe08007e0ee9","542985897a6b690800767fab","5429898d1215fe08007e0fe6","542ac5aa54d88d140075fcaf"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":11,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T16:43:16.683Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","try":true,"basic_auth":false,"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":7,"body":"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.\n\n# Configuration\n\nStart 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.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Name all of the possible variants of your email here.\\nversions:\\n  - customer\\n  - prospect\",\n      \"language\": \"yaml\",\n      \"name\": \"config.yml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Multi-Word Versions\",\n  \"body\": \"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`\"\n}\n[/block]\n# Specifying Content for a Specific Version\n\nVersion-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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"We're proud to announce the release of ACME Widget Bedazzler 2.0!\\n<br><br>\\n<b>\\n  <% if customer? %>\\n    <!-- Will appear in the customer-specific version of the email. -->\\n  \\tUpgrade today for only $19.95!\\n\\t<% else %>\\n    <!-- Will appear in the prospect version of the email. -->\\n  \\tIntroductory priced at $59.95!\\n\\t<% end %>\\n</b>\",\n      \"language\": \"html\",\n      \"name\": \"source.html\"\n    }\n  ]\n}\n[/block]\n# Previewing Versions In-Browser\n\nWithout 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"inkcite server --version prospect\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nIf 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: `http://0.0.0.0:4567/?version=prospect` or `http://0.0.0.0:4567/?version=customer`\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Version Shorthand\",\n  \"body\": \"Inkcite accepts `v` as shorthand for the version parameter - e.g. `-v (VERSION NAME)` and `v=(VERSION NAME)`\"\n}\n[/block]\n# Previewing Versions in an Email Client\n\nWhen 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.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"subject: Introducing our new product! [{version}]\",\n      \"language\": \"text\",\n      \"name\": \"config.yml\"\n    }\n  ]\n}\n[/block]\nSend your email preview to the appropriate distribution list like you normally do:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"inkcite preview internal\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nAfter 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:","excerpt":"Easily create several variations of the same email from a single source file.","slug":"ab-testing-and-versioning","type":"basic","title":"A/B Testing and Versioning"}

A/B Testing and Versioning

Easily create several variations of the same email from a single source file.

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. # Configuration 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. [block:code] { "codes": [ { "code": "# Name all of the possible variants of your email here.\nversions:\n - customer\n - prospect", "language": "yaml", "name": "config.yml" } ] } [/block] [block:callout] { "type": "warning", "title": "Multi-Word Versions", "body": "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`" } [/block] # 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: [block:code] { "codes": [ { "code": "We're proud to announce the release of ACME Widget Bedazzler 2.0!\n<br><br>\n<b>\n <% if customer? %>\n <!-- Will appear in the customer-specific version of the email. -->\n \tUpgrade today for only $19.95!\n\t<% else %>\n <!-- Will appear in the prospect version of the email. -->\n \tIntroductory priced at $59.95!\n\t<% end %>\n</b>", "language": "html", "name": "source.html" } ] } [/block] # 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: [block:code] { "codes": [ { "code": "inkcite server --version prospect", "language": "shell" } ] } [/block] 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: `http://0.0.0.0:4567/?version=prospect` or `http://0.0.0.0:4567/?version=customer` [block:callout] { "type": "info", "title": "Version Shorthand", "body": "Inkcite accepts `v` as shorthand for the version parameter - e.g. `-v (VERSION NAME)` and `v=(VERSION NAME)`" } [/block] # 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. [block:code] { "codes": [ { "code": "subject: Introducing our new product! [{version}]", "language": "text", "name": "config.yml" } ] } [/block] Send your email preview to the appropriate distribution list like you normally do: [block:code] { "codes": [ { "code": "inkcite preview internal", "language": "shell" } ] } [/block] 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: