To enable an affiliate marketing program in Magento 2: Log in to Admin Panel > Store > Configuration > Mageplaza Extensions > Affiliate > General configuration and turn the Enable to Yes. Follow our guide to set up everything for your affiliate program.