Skip to main content

One Click survey - Klaviyo Email

Learn how to include a One Click survey inside your Klaviyo email template.

Written by Stuart Jones

This example uses an NPS question type, but the same approach works with other question types, including CSAT surveys and single choice questions.

This is the email template we will be creating within Klaviyo:

For a complete overview on the One Click survey feature, please see our guide One Click survey links overview.

Adding customer data to your one click links

URL parameters can be appended to each One Click link to pass customer data through with the survey response. This allows Grapevine Surveys to attribute responses to a specific customer or order.

The parameters you can include depend on the Klaviyo trigger being used.

Start with your base One Click link from your Grapevine Survey

Your base One Click link will look something like this:

https://myexamplestore.com/tools/survey/one-click/947263555e9f32/99283ce991eef?answer=This%20is%20my%20selection

From here, you simply append the relevant Klaviyo merge tag parameters to the end of the URL.

Please note: When adding merge tags to your URLs, make sure to include |default:'' in each one. This tells Klaviyo to insert a blank value if the customer data is missing, keeping the URL intact and preventing broken links.

Standard Klaviyo flows

For most Klaviyo flows, you can pass through the customer's first name, last name and email address:

&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}

Full example URL:

https://myexamplestore.com/tools/survey/one-click/947263555e9f32/99283ce991eef?answer=This%20is%20my%20selection&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}

Order Event flows

If your Klaviyo flow is triggered by an Order Event, you can also pass through the customer ID and order ID:

&customer_id={{ event.extra.customer.default_address.customer_id|default:'' }}&order_id={{ event.extra.id|default:'' }}

Full example URL:

https://myexamplestore.com/tools/survey/one-click/947263555e9f32/99283ce991eef?answer=This%20is%20my%20selection&customer_id={{ event.extra.customer.default_address.customer_id|default:'' }}&order_id={{ event.extra.id|default:'' }}&email={{ email|default:'' }}

This approach works for both Klaviyo flows and campaigns. For guidance on setting up flows or campaigns within Klaviyo, please refer to Klaviyo's own documentation.

Tip: URL variables are optional. If you don't include them, the survey will still record the one click response, it will just be collected anonymously.

​Designing your survey in Klaviyo

Grapevine Surveys provides the unique One Click URL for each response option, how those links are presented to your customers is entirely up to you. There is no automation here... you take the URLs generated by Grapevine Surveys and build them into your email template however you choose, whether that's clickable numbers, buttons, star images, or any other format that suits your brand.

This gives you full creative control over the look and feel of your survey. For example, for an NPS survey you might display numbers 0–10 as individual clickable buttons, each linked to its corresponding URL. For a star rating, you could use star images linked to each score value.

In short: Grapevine Surveys generates the links. You decide how they look.

Adding the HTML Block to Your Klaviyo Template

Before you start: Make sure you have already appended your Klaviyo merge tag parameters to each One Click URL as described in the section above. You should have a fully built URL ready for each answer option, not just the base One Click links from Grapevine Surveys.

Once you have your complete One Click URLs, you'll need to add them to your Klaviyo email template using a custom HTML block:

  • In Klaviyo, open the email template you want to edit (or create a new one).

  • In the template editor, drag a Text block or if available, a HTML block into your email layout in the position where you want the survey to appear.

  • Click the block to edit it, then switch to the HTML / Source view. In Klaviyo's drag-and-drop editor, you can access this via the </> icon within the block settings.

  • Paste the example HTML code (see the Example HTML Code section below) into the block, then replace the placeholder URLs with your own One Click URLs

  • Save the block and preview your email to confirm the survey displays as expected.

Tip: If you're using Klaviyo's drag-and-drop editor and can't find an HTML block, try switching to the Classic template editor, which should give you full HTML access.

Example HTML Code

Below is a ready-to-use HTML example for an NPS survey (scores 0–10). Copy this into your HTML block in Klaviyo and update the URLs as described.

Each One Click URL in the code follows this structure:

https://[store-domain]/tools/survey/one-click/[survey-code]/[question-code]?answer=0

Simply replace each full placeholder URL with the corresponding One Click URL copied directly from Grapevine Surveys, or your altered links containing the additional URL parameters with merge fields. There will be one unique URL per score (0 through 10), so you will need to swap out 11 URLs in total.

The ?answer=0, ?answer=1 values are already built into your One Click URLs and should not be changed.

<table align="center" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px; background: #ffffff; border: 1px solid #eeeeee; border-radius: 2px; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; color: #2c2c2a; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100;">
<tbody>
<!-- Greeting -->
<tr>
<td style="font-size: 16px; line-height: 160%; padding: 25px 25px 0 25px;">
<p style="margin: 0;">Hi {{ first_name|default:"there" }},</p>
</td>
</tr>
<!-- Intro text -->
<tr>
<td style="font-size: 16px; line-height: 160%; padding: 25px 25px 0 25px;">
<p style="margin: 0;">To help us provide you the best experience possible, we'd like your help with this very brief survey.</p>
</td>
</tr>
<!-- NPS Survey Block -->
<tr>
<td style="padding: 25px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px; background-color: #f2f4f8; border: 1px solid #d9dbde; border-radius: 3px;">
<tbody>
<!-- Question -->
<tr>
<td style="font-size: 15px; padding: 16px; color: #2c2c2a;">
On a scale from 0-10, how likely are you to recommend us to a friend or colleague?
</td>
</tr>
<!-- Labels -->
<tr>
<td style="padding: 0 16px 4px 16px;">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; color: #a5a5a5; font-size: 13px;">
<tbody>
<tr>
<td align="left" style="text-align: left;">Not at all likely</td>
<td align="right" style="text-align: right;">Extremely likely</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- Score buttons 0-10 -->
<tr>
<td style="padding: 0 16px 16px 16px;">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; text-align: center;">
<tbody>
<tr>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=0&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">0</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=1&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">1</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=2&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">2</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=3&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">3</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=4&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">4</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=5&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">5</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=6&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">6</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=7&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">7</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=8&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">8</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=9&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">9</a></td>
<td style="width: 4px;">&nbsp;</td>
<td style="font-size: 18px; width: 40px; border-radius: 3px; background: #ffffff; border: 1px solid #a5a5a5;"><a href="https://******.myshopify.com/tools/survey/one-click/******/******?answer=10&email={{ email|default:'' }}&first_name={{ first_name|default:'' }}&last_name={{ last_name|default:'' }}" style="display: block; text-decoration: none; color: #666666; line-height: 40px; border-radius: 3px;">10</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- Thank you -->
<tr>
<td style="font-size: 16px; line-height: 160%; padding: 0 25px;">
<p style="margin: 0;">Thank you for your candid feedback!</p>
</td>
</tr>
<!-- Sign-off -->
<tr>
<td style="font-size: 16px; line-height: 160%; padding: 25px;">
<p style="margin: 0;">Cheers,<br>Your Team Name</p>
</td>
</tr>
</tbody>
</table>


Testing Your Email

Before sending your campaign or activating your flow, test that your One Click links are working correctly.

  • Preview in Klaviyo: Use Klaviyo's preview function to check that the survey block renders correctly. Confirm the buttons display as expected and that the merge tags (e.g. {{ first_name }}) resolve as intended.

  • Send a test email: Send a test to yourself using Klaviyo's Send Test option. This will populate real merge tag values and let you see the email exactly as a customer would.

  • Click a link and verify the response: In your test email, click one of the score buttons. You should be taken to either a follow-up question page or a Thank You page on your store. Then check within Grapevine Surveys to confirm the test response was recorded correctly.

  • Check for broken links: If a link doesn't work, double-check that the URL has been correctly copied from Grapevine Surveys and that no characters have been accidentally removed or modified during pasting into Klaviyo.

Note: Klaviyo's preview mode may not always render custom HTML blocks exactly as they appear in a live email client. Always send a test email to a real inbox to confirm the final result.

After a customer clicks

When a customer clicks a One Click link in your Klaviyo email, one of the following will happen depending on your survey configuration:

  • If the survey has further questions, the customer is taken to a page on your store where they can complete the remaining questions. This page inherits your store theme's header, footer, and styling. Their first answer is automatically recorded from the One Click link. They do not need to re-select it on this page.

  • If the survey has only one question, the customer is shown a Thank You confirmation page on your store. You can customise the title, message text, button text, and button destination URL within the One Click settings in Grapevine Surveys.

Tip: If a customer clicks more than one score button in the same email, each click will be recorded as a separate response. To prevent this, enable the Only capture one response per customer setting, found under the Settings tab of the Grapevine Surveys editor.

Need any help?

If you have any questions about this guide or anything else Grapevine Surveys related, please do just get in touch.

Did this answer your question?