# Offer a discount for newsletter signups All FoxEcom themes Many merchants use **a newsletter popup** to offer a discount in exchange for an email signup. However, **themes don't automatically generate or email discount codes** after a customer subscribes. To offer a discount to newsletter subscribers: 1. **Create the discount code in Shopify Admin.** [Learn more](https://help.shopify.com/manual/discounts/discount-methods/discount-codes) 2. **Share the discount code with customers** using one of the following methods:
**Method 1:** [Display the code in your newsletter popup or success message.](https://docs.foxecom.com/hyper-theme/guides/shopify-features-and-integrations/offer-a-discount-for-newsletter-signups#display-the-discount-code-in-the-success-message)
**Method 2:** Send the code by email automatically using one of the 2 below email provider. * [Include the discount code in **Shopify's marketing confirmation email**](https://docs.foxecom.com/hyper-theme/guides/shopify-features-and-integrations/offer-a-discount-for-newsletter-signups#include-the-discount-code-in-the-marketing-confirmation-email). * [Use a third-party email app such as **Klaviyo**, **Mailchimp**, or **Omnisend**](https://docs.foxecom.com/hyper-theme/guides/shopify-features-and-integrations/offer-a-discount-for-newsletter-signups#send-the-discount-code-with-an-email-marketing-app). ## Display the discount code in the success message Show the discount code in the newsletter popup's **Success** message. Customers will see the code immediately after subscribing. ![](https://docs-assets.foxecom.app/shared-documentation/fc4f862e-8764-4c9e-a11c-55f97c8e8878.png) This option displays the discount code on the screen only. **It doesn't send the code by email.** **Steps:** 1. Go to **Online Store**. 2. Next to your current theme, click **⋯ (More options)** > **Edit default theme content**.![](https://docs-assets.foxecom.app/shared-documentation/24679c68-1ff7-4564-8f35-7c6459575834.png) 3. Search for the **Thanks for subscribing** message.![](https://docs-assets.foxecom.app/shared-documentation/6ef2b065-78fb-4189-b70b-0d541ef14890.png) 4. Update the message to include your discount code.
**Example**: *Thanks for subscribing! Use code **WELCOME10** for **10% off** your first order.* 5. Click **Save**. ## Include the discount code in the marketing confirmation email Send the discount code in Shopify's **Customer marketing confirmation** email. Customers receive the code in their inbox after confirming their newsletter subscription. **Steps:** 1. Go to **Shopify Admin > Settings > Notifications**. 2. Select **Customer notifications** and scroll to **Customer marketing confirmation**.![](https://docs-assets.foxecom.app/shared-documentation/7fd8cf1c-456c-44dd-bcaf-c8b6fd0791eb.png)![](https://docs-assets.foxecom.app/shared-documentation/7dd7cb47-c1d2-40a1-85f4-254862148e9b.png) 3. Click **Edit code**.![](https://docs-assets.foxecom.app/shared-documentation/48fd015d-63cd-47dd-96de-4a6f19c23088.png) 4. Locate the `{% capture email_body %} ... {% endcapture %}` block. 5. Add your discount code to the email body.
Example: *Thanks for subscribing! Use code **WELCOME10** for **10% off** your first order.*![image](https://docs-assets.foxecom.app/hyper-theme/image_sPKsqJen.png) 6. Click **Save**. ## Send the discount code with an email marketing app Use an email marketing app (e.g., **Klaviyo**, **Omnisend**, or **Mailchimp)** to automatically send a welcome email with your discount code after a customer subscribes. This option gives you more control over branding, automation, and follow-up marketing. **Steps:** 1. **Install and connect** your preferred email marketing app to Shopify. 2. Create an automation triggered by a **new newsletter signup**. 3. Design your welcome email and include your discount code.
**Example:** *Thanks for subscribing! Use code **WELCOME10** for **10% off** your first order.* 4. Choose when the email should be sent. 5. Activate the automation. **Expected result:** Each new subscriber automatically receives a welcome email containing your discount code. ## Best practices 1. [Create your discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes) in **Shopify Admin > Discounts** before setting up the automation. 2. Use **single-use** or **time-limited** discount codes to reduce code sharing. 3. Keep your popup, success message, and email consistent with your brand. 4. Test the complete flow before publishing: * Subscribe with a test email. * Confirm the subscription (if applicable). * Verify that the email is delivered. * Test that the discount code works at checkout.