> For the complete documentation index, see [llms.txt](https://docs.personaldiscount.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.personaldiscount.io/discounteo-for-shopify/integrate-discounteo-with-your-email-service-provider/mailchimp/how-to-display-a-discount-code-as-an-image-in-a-mailchimp-message.md).

# How to display a discount code as an image in a Mailchimp message

Would you like the discount code in the Mailchimp message to be displayed as an image that, when clicked on, redirects the customer to your shop with the discount code applied?

This is a method that Discounteo uses to integrate with any other email marketing service (other than Mailchimp, but it also works with Mailchimp). The HTML snippet generates a unique discount code when a recipient opens the email for the first time. The key advantage, in this case, is that it's no longer needed to hold on sending the email until the discount is ready. So the filter condition "Shopify Discount Code is not blank" is not necessary. Nevertheless, there is also a little disadvantage in that the discount code is shown as an image, so it's not possible to copy the code. However, the image is wrapped with a link redirecting to the checkout and automatically applying the discount code.

Firstly, navigate to your **Shopify dashboard** ➜ **Apps** ➜ **Discounteo** and hit **Add automation.** Then, select **Other** as your Email Service Provider and the desired campaign type.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FEYbICDjce8Ky3tyXLFut%2Fshopify-personal-discount-add-automation-animated.gif?alt=media&amp;token=335d0917-8754-4252-bdaa-746e2e242fd3" alt="How to add a Discounteo automation"><figcaption><p>Add Discounteo automation</p></figcaption></figure>

Set up the discount according to your needs. For more information have a look at the article on [how to configure a discount](/discounteo-for-shopify/configure-discount.md).

Next, copy the HTML code snippet that you can find at the bottom of the automation settings page.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FwttEUm02KKVfXKDbMlIB%2Fshopify-personal-discount-copy-the-code-snippet-animated.gif?alt=media&amp;token=e0e58725-2667-44d3-93bc-1d2043e5be4c" alt="How to copy a code snippet from Discounteo"><figcaption><p>Copy the code snippet from Discounteo</p></figcaption></figure>

Now switch over to Mailchimp and edit an email template from your automation. If your template contains **\*|DSCNT\_CODE|\***, delete it. Next, add a code block to the email template and edit this element. Delete the default code snippet and paste the one that you copied from Discounteo.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FEA4nG77Nc65Wd27o1dff%2Fshopify-personal-discount-code-with-mailchimp-insert-code.gif?alt=media&amp;token=62eb96c8-d17b-4452-98c0-d984e4cb2c38" alt="How to insert a Discounteo code snippet into a Mailchimp email template"><figcaption><p>Insert the code snippet from Discounteo</p></figcaption></figure>

Now replace both occurrences of **{{email}}** with **\*|EMAIL|\*** in the code snippet you just pasted.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FtOG1LW9OL6vdLgfP6hDa%2Fshopify-personal-discount-code-with-mailchimp-change-email-merge-tag.gif?alt=media&amp;token=8988f111-8c81-4718-992e-eb51f0a17788" alt="How to replace the email merge tag in a Discounteo code snippet"><figcaption><p>Replace <strong>{{email}}</strong> with Mailchimp customer email address merge tag</p></figcaption></figure>

Save the email template. Finally, remove the condition **discount code is not blank** if it was set.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FiTrioGGQ2efIhLe8zzok%2Fmailchimp-delete-automation-filters.gif?alt=media&amp;token=41c27dab-08e8-45a5-b269-610125d9da92" alt="How to disable the “Shopify Discount Code is not blank” filter in Mailchimp"><figcaption><p>Disable Shopify Discount code is not blank filter in Mailchimp</p></figcaption></figure>

From now on, a unique discount code will be generated when a recipient opens the email for the first time. A code will be displayed as a clickable image.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FUav4N36r4H0NTlC3CW6G%2Fshopify-personal-discount-code-with-mailchimp.png?alt=media&amp;token=18af8cd5-078f-40cc-bb40-1b1a62b822b9" alt="Shopify Discounteo code in an email"><figcaption><p>Shopify Discounteo code in an email</p></figcaption></figure>
