Smartlink Discount URLs

Overview

↑ Back to top

Smartlink Discount URLs is a powerful WooCommerce extension that allows you to create smart, shareable discount links. These links can automatically add products to the customer’s cart, apply coupons, and redirect to specific landing pages – all in one click.

Features

↑ Back to top
  • Smart URLs: Create unique, branded URLs that apply discounts automatically
  • Product Bundling: Add multiple products to cart with a single link
  • Automatic Coupon Application: Apply coupons without requiring customers to enter codes
  • Custom Landing Pages: Redirect customers to specific pages after adding products
  • Analytics: Track clicks, conversions, and revenue for each smartlink
  • Rate Limiting: Prevent abuse with configurable rate limiting
  • WooCommerce Integration: Seamlessly integrates with your existing WooCommerce store

Installation

↑ Back to top
  1. Upload the smartlink-discounts folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Ensure WooCommerce is installed and activated
  4. Important: Go to Settings → Permalinks and click “Save Changes” to flush the rewrite rules
  5. Configure the plugin settings at WooCommerce → Settings → Smartlinks

Configuration

↑ Back to top

General Settings

↑ Back to top
  1. Navigate to WooCommerce → Settings → Smartlinks → Settings
  2. Configure the following options:
  • Enable Smartlink Tab: Enable/disable the Smartlink tab on the coupon edit page
  • Rate Limit: Set the maximum number of requests per hour from a single device
  • URL Base: Configure the base URL segment for your smartlinks (e.g., discount)
  • Coupon Field Visibility: Control whether to show/hide coupon fields on cart and checkout pages
  • Debug Mode: Enable for troubleshooting purposes

Creating a Smartlink

↑ Back to top

Method 1: Using the Smartlinks Manager

  1. Go to WooCommerce → Settings → Smartlinks
  2. Click “Add New” to create a new smartlink
  3. Fill in the details:
  • Coupon Code: Create a new coupon or select an existing one
  • Discount Type: Percentage, fixed cart, or fixed product
  • Discount Amount: The amount of the discount
  • Products: Select products to add to cart automatically
  • Landing Page: Choose where to redirect customers after applying the smartlink
  1. Save the smartlink to generate a unique URL

Method 2: Using the Coupon Edit Page (if enabled)

  1. Go to WooCommerce → Coupons
  2. Create a new coupon or edit an existing one
  3. Fill in the standard coupon details (code, amount, restrictions, etc.)
  4. Navigate to the “Smartlink” tab
  5. Configure the smartlink options:
  • Unique URL: Set a custom URL segment or use the auto-generated one
  • Landing Page: Select a page to redirect to after applying the coupon
  • Defer Apply: Choose whether to apply the coupon immediately or wait until conditions are met
  • Products to Add: Select products to add to the cart automatically
  1. Save the coupon to activate the smartlink

Using Smartlinks

Sharing Smartlinks

↑ Back to top

Your smartlink URL will follow this format:

https://yourdomain.com/discount/your-unique-url

Share this URL through:

  • Email campaigns
  • Social media
  • Affiliate programs
  • Advertisements
  • QR codes

Customer Experience

↑ Back to top

When a customer clicks on a smartlink:

  1. They are directed to your store
  2. The specified products are automatically added to their cart
  3. The coupon is applied (if not deferred)
  4. They are redirected to the specified landing page

Analytics

↑ Back to top

Track the performance of your smartlinks:

  1. Go to WooCommerce → Settings → Smartlinks
  2. View the list of your smartlinks
  3. Click the “Analytics” icon for any smartlink to see:
  • Click count
  • Conversion rate
  • Total revenue
  • Order count

Troubleshooting

↑ Back to top

URL Rewriting Issues

↑ Back to top

If your smartlinks return 404 errors:

  1. Go to Settings → Permalinks
  2. Click “Save Changes” to flush the rewrite rules
  3. Test your smartlink again

Rate Limiting

↑ Back to top

If customers report being unable to use smartlinks:

  1. Check your rate limit settings
  2. Consider increasing the limit if legitimate users are being blocked
  3. Enable Debug Mode for more detailed logs

Debug Mode

↑ Back to top

To troubleshoot issues:

  1. Go to WooCommerce → Settings → Smartlinks → Settings
  2. Enable Debug Mode
  3. Check the WordPress debug log for detailed information

Integrating with Gutenberg

↑ Back to top

You can easily add smartlinks to your Gutenberg pages:

Using the Button Block

↑ Back to top
  1. Add a Button block to your page
  2. Set the button text (e.g., “Get 20% Off”)
  3. Set the link to your smartlink URL
  4. Customize the button appearance as desired

Using Custom HTML Block

↑ Back to top

For more advanced tracking, you can use a Custom HTML block:

<a href="https://yourdomain.com/discount/your-unique-url" 
class="smartlink-button"
data-tracking="campaign-name">
Get 20% Off Now
</a>

Best Practices

  • Use Descriptive URLs: Make your unique URL segments meaningful for better tracking
  • Set Appropriate Expiry Dates: Ensure coupons have suitable expiration dates
  • Test Before Sharing: Always test your smartlinks before including them in campaigns
  • Monitor Analytics: Regularly check performance to optimize your offers
  • Flush Permalinks After Changes: If you modify the URL base setting, remember to flush permalinks