The ViralMarketingWP – Auto Rewards addon enhances your viral marketing campaigns by automatically delivering rewards to participants when they reach specified referral thresholds. This addon eliminates the need for manual reward management, allowing you to create a seamless and engaging experience for your campaign participants.

Features

  • Automatic Reward Delivery: Instantly deliver rewards when participants reach referral thresholds
  • Multiple Reward Types: Offer coupon codes, download links, or custom text/HTML content
  • Email Notifications: Automatically notify participants when they earn rewards
  • Customizable Email Templates: Personalize email content with dynamic placeholders
  • Frontend Display: Show delivered rewards in the participant’s dashboard
  • Clipboard Integration: One-click copying for coupon codes

Requirements

  • WordPress 5.0 or higher
  • ViralMarketingWP plugin (core) installed and activated
  • PHP 7.0 or higher

Installation

  1. Download the ViralMarketingWP – Auto Rewards addon from your account at viralmarketingwp.com
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded zip file and click Install Now
  4. After installation is complete, click Activate Plugin

Setting Up Auto Rewards

Creating a Reward with Automatic Delivery

  1. Edit an existing campaign or create a new one by going to ViralMarketingWP > Campaigns
  2. In the campaign editor, scroll down to the Rewards section
  3. Add a new reward or edit an existing one
  4. Fill in the standard reward fields (title, description, required referrals)
  5. Check the Enable automatic delivery when threshold is met option
  6. Configure the reward settings as described below

Reward Configuration Options

Reward Type

Select one of the following reward types:

  • Coupon Code: Provide a discount or promotional code that participants can use
  • Download Link: Offer a URL where participants can download digital content
  • Text/HTML Content: Display custom text or HTML content as a reward

Reward Content

Enter the actual reward content based on the selected type:

  • For Coupon Code: Enter the code (e.g., “SAVE20NOW”)
  • For Download Link: Enter the full URL to the downloadable file
  • For Text/HTML Content: Enter any text or HTML content you want to display

Email Notification

Enable and configure email notifications for when rewards are delivered:

  1. Check the Send email notification when reward is delivered option
  2. Enter an Email Subject (you can use {reward_title} as a placeholder)
  3. Enter the Email Message content with available placeholders:
    • {reward_title} – The title of the reward
    • {reward_description} – The description of the reward
    • {reward_content} – The actual reward content (coupon code, download link, etc.)
    • {first_name} – The participant’s first name

Frontend Display

Check the Show delivered reward in user dashboard option to make the reward content visible to participants in their dashboard after it’s been delivered.

How Automatic Rewards Work

  1. A participant reaches the required number of referrals for a specific reward
  2. The system automatically checks if the reward is configured for automatic delivery
  3. If automatic delivery is enabled, the reward is immediately delivered:
    • The reward is marked as delivered in the system
    • If email notification is enabled, an email is sent to the participant
    • The reward appears in the participant’s dashboard (if the option is enabled)

Frontend Display

When a participant receives a reward, it will be displayed in their dashboard according to its type:

  • Coupon Code: Displayed as a copyable code with a “Copy” button
  • Download Link: Displayed as a “Download Your Reward” button
  • Text/HTML Content: Displayed as formatted text or HTML content

All delivered rewards include a timestamp showing when they were delivered.

Customizing the Email Templates

You can customize the email notification for each reward. Here are some recommended templates:

For Coupon Rewards:

Subject: Your {reward_title} Discount Code Is Ready!

Message:

Hi {first_name},

Congratulations on reaching {required_referrals} referrals in our campaign!

Your reward is ready: {reward_title}

{reward_description}

Here's your discount code:
{reward_content}

Simply copy this code and use it at checkout to redeem your discount.

Thank you for participating in our campaign!

For Download Rewards:

Subject: Your {reward_title} Download Is Ready!

Message:

Hi {first_name},

Great work on reaching {required_referrals} referrals in our campaign!

Your reward is ready: {reward_title}

{reward_description}

To download your reward, simply click the link below:
{reward_content}

Thank you for your participation!

JavaScript Functionality

The addon includes JavaScript functionality to:

  1. Allow one-click copying of coupon codes with visual feedback
  2. Toggle visibility of configuration options in the admin based on selected settings
  3. Properly handle the addition of new rewards in the campaign editor

Troubleshooting

Rewards Not Being Delivered

If rewards are not being automatically delivered:

  1. Verify that the “Enable automatic delivery when threshold is met” option is checked for the reward
  2. Make sure the participant actually reached the required number of referrals
  3. Check that the reward content is properly configured for the selected reward type
  4. Look for any JavaScript errors in your browser console that might affect functionality

Email Notifications Not Being Sent

If email notifications are not being sent:

  1. Ensure that the “Send email notification when reward is delivered” option is checked
  2. Verify that the participant has a valid email address in the system
  3. Check your server’s email configuration
  4. Try using an SMTP plugin to improve email deliverability

Reward Content Not Displaying

If the reward content is not displaying in the participant’s dashboard:

  1. Confirm that the “Show delivered reward in user dashboard” option is checked
  2. Verify that the reward has actually been delivered (check lead meta data)
  3. Ensure there are no conflicts with your theme or other plugins that might affect display

Hooks and Filters

Developers can use the following hook to extend functionality:

  • viralmarketingwp_reward_delivered: Fires when a reward is automatically delivered
    • Parameters: $lead_id, $campaign_id, $reward

Updates

This plugin receives regular updates to ensure compatibility with the latest versions of WordPress and ViralMarketingWP. Keep your plugin updated to ensure optimal functionality and security.