> 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/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/vitals/how-to-create-a-pop-up-and-include-a-discount-code-in-welcome-emails-with-the-vitals-app.md).

# How to create a pop-up and include a discount code in welcome emails with the Vitals app

Open your **Personal Discount** app and **Add automation**. Select '**Other**' as your email service and **Welcome new subscribers** as the campaign type.

<figure><img src="/files/hyLTBWymrG6hUVmNKAeh" alt="Add Personal Discount welcome new subscribers automation with Other email service animated"><figcaption><p>Add Personal Discount welcome new subscribers automation with Other email service provider</p></figcaption></figure>

Now fill out the form with automation details. If you need more information about that, here is a useful article on [how to configure discount](/personal-discount-for-shopify/configure-discount.md). Save your automation and copy the code snippet to the clipboard.

<figure><img src="/files/LEPAKshGnDwhqhvNs9Kv" alt=""><figcaption></figcaption></figure>

Switch out to your **Vitals dashboard**. From the left-hand bar, click **Engage customers** then **Email Marketing**.

<figure><img src="/files/eCirHFc2D8eEHvrNAFvP" alt=""><figcaption></figcaption></figure>

Open the **Welcome** automation.

<figure><img src="/files/aS0m80Db0I15AgmKnZJB" alt=""><figcaption></figcaption></figure>

Now enable your automation status and decide how many messages will be sent to your customer. In that case, one is enough. You can disable **Message #2** and **Message #3**. Edit **Message #1** which will contain a discount code.

<figure><img src="/files/i7YZdbREDnOMlxXBgacg" alt=""><figcaption></figcaption></figure>

Set config for your message then go to the content. To include the discount code into your mail you need to drag and drop the **HTML element**, as you can see below.

<figure><img src="/files/jFHbpdtg33zniIjBBPaZ" alt=""><figcaption></figcaption></figure>

Delete the existing code snippet and paste the one from your Personal Discount automation.

<figure><img src="/files/twlucQonSPIsTZH50zMF" alt=""><figcaption></figcaption></figure>

Now you need to modify this code snippet a bit. Delete **{{email}}** and paste\
\&#xNAN;**{{ customer\_email }}** in two places marked below.

<figure><img src="/files/eUY4MyATFwONfUUjrP0Z" alt=""><figcaption></figcaption></figure>

**Save** all changes.

<figure><img src="/files/eglz6ojgEz3Vrqdgxc9X" alt=""><figcaption></figcaption></figure>

Don't forget to enable the **Email Marketing** app.

<figure><img src="/files/TigFdbBq2rMYyrcn9ere" alt=""><figcaption></figcaption></figure>

Now create your pop-up. Go to **Capture Leads** > **Pop-up**. Click '**Create**' and select **Lead Capture** type.

<figure><img src="/files/DvoVD08emv410c9XouJQ" alt=""><figcaption></figcaption></figure>

Customize your pop-up template. Enable this one and save all changes.

<figure><img src="/files/aGLS71citxyxp9tNWbAe" alt=""><figcaption></figcaption></figure>

Also, enable the pop-up app. If something doesn't work as you expected, visit the '**Settings**' tab.

<figure><img src="/files/U8uV2onOuSNhbVaj1Lvb" alt=""><figcaption></figcaption></figure>

Now you can test the behavior of your automation. A unique discount code will be included in an email message.
