> 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/activecampaign/how-to-add-a-unique-discount-code-to-welcome-emails-in-activecampaign.md).

# How to add a unique discount code to welcome emails in ActiveCampaign

A step by step guide on how to send a welcome email from ActiveCampaign that will include a unique discount code to be redeemed in your Shopify store.

First, let's prepare a discount automation in Discounteo. Open **Discounteo** in your **Shopify admin panel**, and click on **Add automation**. Select **ActiveCampaign** as email service provider and **Welcome new subscribers** as the campaign type.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FbdvD1mOsMtYD8g066gK7%2Fshopify-activecampaign-welcome-campaign-personal-discount-code-animated.gif?alt=media&amp;token=5f8f7f9d-e22f-4af2-af39-30638fb4b531" alt="How to create a welcome Discounteo automation for ActiveCampaign"><figcaption><p>Create a Discounteo welcome automation for ActiveCampaign</p></figcaption></figure>

Specify the discount settings

* code pattern
* discount type
* discount value
* usage limit
* expiration date

according to your needs. Hit **Save** once you are done.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F6kD2YLecuQXdVEgTzuGO%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-discount-details.png?alt=media&amp;token=8220f9f0-8f20-4625-8494-cfb5f88b9ad2" alt="Save your Discounteo automation"><figcaption><p>Save your Discounteo automation</p></figcaption></figure>

Scroll down to the bottom of the settings page, and copy the code snippet. It's enough when you click on the code snippet and then the app will copy it to your clipboard.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FxEfivVZTxiIDFR1UvvAN%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-code-snippet.png?alt=media&amp;token=9d720d37-815b-43fd-837b-545183b9b666" alt="Copy the code snippet from Discounteo"><figcaption><p>Copy the Discounteo code snippet</p></figcaption></figure>

Now, log in to your ActiveCampaign account and navigate to Automations. If you don't have a welcome email series yet then click on **Create an automation**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FiFI9wqNTz7JYlcDwXgfA%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-automation.png?alt=media&amp;token=33bf817c-acbc-4e78-bfa1-d20749ccfb66" alt="Create a new ActiveCampaign automation"><figcaption><p>Create a new ActiveCampaign automation</p></figcaption></figure>

Filter available recipes by the keyword "welcome". Select **Welcome Series** and click on **Continue**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FVGgR1UYbcL0EZwVGbrhO%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-automation-type.png?alt=media&amp;token=41eca7e7-233a-4f58-a9a1-3cf2d88333da" alt="Select a campaign type in ActiveCampaign"><figcaption><p>Select a campaign type in ActiveCampaign</p></figcaption></figure>

You'll see a workflow designer. Click on **Get Started** to let the automation wizard guide you through the initial setup where you specify the email address from which the welcome email is going to be sent.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FaE7eeFcfxtDntzkoSTCa%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-start-automation.png?alt=media&amp;token=9495160b-53d6-4f08-9bd2-ef7def2f5545" alt="How to configure your ActiveCampaign automation"><figcaption><p>Configure your ActiveCampaign automation</p></figcaption></figure>

Click on the first email in the series. It's the flow element described as **Send an email "Welcome Email"**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FbDFXSdK4TjxudjzECWsJ%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-send-an-email.png?alt=media&amp;token=b915e63b-d0ac-4038-8229-1ae5683fa672" alt="How to configure an email step in an ActiveCampaign automation"><figcaption><p>Set up email sending in an ActiveCampaign automation</p></figcaption></figure>

A pop-up appears where you need to click on **Edit** to open the email template editor.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FVP8sQ5Sp1Fyex3ML3Oj4%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-welcome-email.png?alt=media&amp;token=55e0d6c2-6acf-49c7-a1bb-7096e666d131" alt="How to edit an ActiveCampaign email template"><figcaption><p>Edit your ActiveCampaign email template</p></figcaption></figure>

In the email editor, drag and drop the **HTML Block** to the desired place in your welcome email.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FDnsYEB7Bog5X6trz7ALK%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-html-block.png?alt=media&amp;token=4ffe2b27-fdb4-4521-bcd2-fda98f0d307c" alt="How to insert an HTML block into an ActiveCampaign email template"><figcaption><p>Insert an HTML block into your ActiveCampaign email template</p></figcaption></figure>

Click on the added HTML Block and paste the code snipped copied from Discounteo.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FQusLcFYeA32CMalY8ZUc%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-code-snippet-paste.png?alt=media&amp;token=109fffc4-0b6d-49ea-8881-f85bfdfcd283" alt="Edit an HTML element and paste the Discounteo code snippet"><figcaption><p>Edit the HTML element and paste the Discounteo code snippet</p></figcaption></figure>

Click on **Save** and you should see a unique discount code added to your email.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FqMB92RmKYXYLdiLMX5Kb%2Fpersonal-discount-code-email-shopify-app-activecampaign-welcome-new-subscribers.png?alt=media&amp;token=3cbb85e9-7657-4f95-bde1-17befdff916c" alt="Discounteo code preview in an ActiveCampaign email template"><figcaption><p>Discounteo discount code preview in an ActiveCampaign email template</p></figcaption></figure>

Click on **Save and exit**. Finally, you can click on **Active** to start sending your welcome series to new subscribers.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FUIYMzXOFHnogNW2CZ80o%2Fpersonal-discount-code-shopify-app-activecampaign-welcome-new-subscribers-activate-automation.png?alt=media&amp;token=acd1e77a-2153-408c-adce-4b8afea66866" alt="How to activate an ActiveCampaign automation"><figcaption><p>Activate your ActiveCampaign automation</p></figcaption></figure>
