# 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.

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**.
3. Search for the **Thanks for subscribing** message.
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**.
3. Click **Edit code**.
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.*
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.