First, let's prepare a discount automation in Personal Discount.
Open Personal Discount in your Shopify admin panel, and click on Add automation.
Select ActiveCampaign as email service provider.
Select Welcome new subscribers as campaign type.
Specify the discount settings
according to your needs. Hit Save once you are done.
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.
Now, log in to your ActiveCampaign account and navigate to Automations. If you don't have a welcome email series yes then click on Create an automation.
Filter available recipes by the keyword "welcome". Select Welcome Series and click on Continue.
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.
Click on the first email in the series. It's the flow element described as Send an email "Welcome Email".
A pop-up appears where you need to click on Edit to open the email template editor.
In the email editor, drag and drop the HTML Block to a desired place in your welcome email.
Click on the added HTML Block and paste the code snipped copied from Personal Discount.
Click on Save and you should see a unique discount code added to your email.
Click on Save and exit. Finally, you can click on Active to start sending your welcome series to new subscribers.