Skip to content

Quick Start: WooCommerce

Get referral tracking running on your WooCommerce store in under 10 minutes. The Advocate Loop plugin handles everything — referral link detection, automatic discount application, and conversion tracking on order completion.

Prerequisites

  • WordPress 5.8 or higher
  • WooCommerce 6.0 or higher
  • An Advocate Loop account (sign up here)

Step 1: Install the plugin

  1. In your WordPress admin, go to Plugins → Add New
  2. Search for “Advocate Loop” or upload the plugin ZIP file
  3. Click Install and then Activate

Step 2: Connect your brand

  1. Go to WooCommerce → Advocate Loop in your WordPress admin
  2. Enter your API Key and Brand ID from the Advocate Loop dashboard (Settings → API Keys)
  3. Click Save Changes

The plugin will verify the connection and show a green checkmark when connected.

Step 3: Configure your referral program

In the Advocate Loop dashboard at app.advocateloop.com:

  1. Go to Settings → Referral Program
  2. Set your customer discount — the discount referred customers receive (e.g., 15% off)
  3. Set your advocate reward — what advocates earn per successful referral (e.g., $10 store credit)
  4. Set your attribution window — how long a referral link stays valid (default: 7 days)

Step 4: Add the referral widget

The widget lets visitors claim their referral discount and lets customers sign up as advocates. Add it to any page:

Option A: Shortcode (recommended)

Add this shortcode to any page or post:

[advocateloop_widget]

Option B: Auto-placement

In the plugin settings, enable “Auto-place widget” and select where it should appear (e.g., after product content, in the sidebar).

Step 5: Test it

  1. Create a test advocate — In the Advocate Loop dashboard, go to Referrers and create a test referrer with your email. Note the referral code (e.g., V2AVMRDJ).

  2. Visit your store with the referral link — Open an incognito/private browser window and visit:

    https://yourstore.com/?ref=V2AVMRDJ
  3. Check that the discount applies — Add a product to cart and go to checkout. The referral discount should be automatically applied as a coupon.

  4. Complete a test order — Place the order. Check the Advocate Loop dashboard — you should see a new claim and conversion.

Plugin settings reference

SettingDescriptionDefault
API KeyYour Advocate Loop API keyRequired
Brand IDYour brand’s UUIDRequired
Cookie DurationHow long the referral cookie persists (days)30
Debug ModeShow detailed logging in browser consoleOff
WooCommerce IntegrationEnable automatic discount and conversion trackingOn
Auto-place WidgetAutomatically add the referral widget to pagesOff

Troubleshooting

Discount not applying at checkout

  • Open browser console and check for [AdvocateLoop] log messages
  • Confirm your discount settings are configured in the Advocate Loop dashboard
  • Verify the visitor arrived through a referral link (?ref=CODE in URL)

Conversion not recording

  • Check the thank-you page console for tracking confirmation
  • Verify your API key is correct in the plugin settings
  • Contact support with the order ID and your brand ID if the issue persists

Widget not showing

  • Ensure the shortcode [advocateloop_widget] is on the page
  • Check for JavaScript errors in the browser console
  • Verify the plugin is activated

Enable Debug Mode in the plugin settings to see detailed API call logging in the browser console for troubleshooting.