Skip to main content
All CollectionsAffiliate Marketing Program
Setup Affiliate V2 in WooCommerce
Setup Affiliate V2 in WooCommerce
Updated over a week ago

Introduction

In this article, you will learn how to setup Affiliate V2 to your store in WooCommerce

Here are the steps to setup Affiliate V2 in WooCommerce:

Step 1: Go to WooCommerce store >> Pages >> All pages >>Click or Add New or Edit button

Step 2: Copy the below code and paste the code. Pass dynamic data in the below HTML.

<div id="aio-affiliate-app"data-customer-id=" pass customer.id"data-customer-email="pass customer.email"data-shop-url="pass shop.permanent_domain"data-shop-name="pass shop.name"style="min-height:400px;display:none"class="aio-affiliate-block-width"></div>โ€‹<script>const affiliateAppDiv = document.getElementById("aio-affiliate-app");const script = document.createElement("script");const aioAffiliatev2Version = new Date().getTime();script.src = `https://static.aitrillion.com/aio-script/aio-affiliate-prod.js?v=${aioAffiliatev2Version}`;script.defer = true;affiliateAppDiv.appendChild(script);</script>โ€‹<style>.aio-affiliate-block-width {width: 100%;text-align: center;}.aio-affiliate-block-width .aio-app-container {width: 1200px;max-width: 100%;margin-left: auto;margin-right: auto;padding-left: 15px;padding-right: 15px;padding-top: 15px;padding-bottom:15px;display: inline-block;text-align: left;}</style>โ€‹

Step 3: Set both data-shop-url and data-shop-name to your store URL - yourstoreURL.com.
For data-customer-id and data-customer-email, pass the dynamic customer id and email.
โ€‹

Now, the Affiliate program will be visible to the front store

Did this answer your question?