---
title: "Subject Line and Preheader Email Prep"
slug: "subject-and-preheader-email-prep"
updated: 2026-05-21T15:24:26Z
published: 2026-05-21T15:24:26Z
canonical: "support.jacquard.com/subject-and-preheader-email-prep"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://support.jacquard.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Subject Line and Preheader Email Prep
The instructions below walk through the one-time setup of a code snippet for use in all experiments with subject line and preheader optimisation.
1. Create a code snippet in Salesforce Marketing Cloud (SFMC) using the following code:
```plaintext
%%[
SET @experimentId = "XXXXXX"
SET @defaultSL = "Paste fallback subject here"
SET @defaultPH = "Paste fallback preheader here"
]%%
```
.png?sv=2026-02-06&spr=https&st=2026-11-14T21%3A34%3A22Z&se=2026-11-14T22%3A34%3A22Z&sr=c&sp=r&sig=IdDBlCm6qGop7BzXc8YQMF5D38yxQVouuut2ZPl2rLY%3D)
2. Create an experiment in Jacquard as per normal, approve it, and start the optimisation. 3. Copy the experiment ID from the Logs panel in the experiment. .png?sv=2026-02-06&spr=https&st=2026-11-14T21%3A34%3A22Z&se=2026-11-14T22%3A34%3A22Z&sr=c&sp=r&sig=IdDBlCm6qGop7BzXc8YQMF5D38yxQVouuut2ZPl2rLY%3D)
4. Drag and drop or paste the code snippet created for all experiments into your email. **Do not use the code snippet Jacquard automatically creates for the individual experiment when you activated it.**
> [!CAUTION]
> **Do not reference the reusable code snippet**
>
> You must drag and drop the code snippet into the email or paste the HTML itself. Do not use an AMPscript reference to refer to the code snippet. You must create a local copy in the email in order to include the correct experiment ID.
.png?sv=2026-02-06&spr=https&st=2026-11-14T21%3A34%3A22Z&se=2026-11-14T22%3A34%3A22Z&sr=c&sp=r&sig=IdDBlCm6qGop7BzXc8YQMF5D38yxQVouuut2ZPl2rLY%3D)
5. Copy the experiment ID into the code snippet with the relevant fallback subject and preheader.
6. Set the subject to:
```plaintext
%%=TreatAsContent(@phraseeSubjectLine)=%%
```
7. Set the preheader to:
```plaintext
%%=TreatAsContent(@phraseePreheader)=%%
```
8. Test and preview your email. You should see the subject and preheader fields populate if you have configured the snippet, subject, and preheader correctly.
.png?sv=2026-02-06&spr=https&st=2026-11-14T21%3A34%3A22Z&se=2026-11-14T22%3A34%3A22Z&sr=c&sp=r&sig=IdDBlCm6qGop7BzXc8YQMF5D38yxQVouuut2ZPl2rLY%3D)