Skip to content

MonetizeUsers Plugin

Daniel Neto edited this page Jul 3, 2023 · 5 revisions

The MonetizeUser plugin allows you to reward video producers based on video views. It provides a convenient solution for incentivizing content creation. To effectively use this plugin, follow the steps below.

This option requires the VideosStatistics YPTWallet and the Scheduler to be properly configured.

All rewarded amounts will be directly added to the user's Wallet.

Plugin Setup

Setting Parameters:

  • Configure the following parameters in the MonetizeUser plugin:

    • rewardPerView:

      • Default: 0.1
      • Determines the amount rewarded per view.
      • The value of 0.1 currency is based on your predefined wallet settings.
    • Minimum Watch Video Percentage:

      • Set the minimum percentage of the video that viewers must watch to be eligible for a reward.
      • For example, if set to 70%, the video producer will only receive a reward if the viewer watches at least 70% or more of the video.
    • Reward Only Logged Users:

      • Enable this option to prevent bots from receiving rewards.
      • By restricting rewards to logged-in users, you can ensure the authenticity of views.

Video View Management

All views are stored in the videos_statistics table. As the table may grow over time, periodic cleanup may be required to optimize database storage. For instance, you can consider deleting records older than one year.

Reward Process

The MonetizeUser plugin periodically queries the videos_statistics table to retrieve all views since the last check. It credits rewards to the video producer's wallet if the view was not made by the video owner and meets the predefined parameters.

To maintain a record of rewarded views, the plugin saves the view records in the monetize_user_reward_log table. This enables safe deletion of records from the videos_statistics table in the future.

Additionally, each video producer can access additional details regarding their rewarded views.

Reward Eligibility Rules

To ensure fair reward distribution, the following rules apply:

  1. Reward Only Registered Users:

    • You have the option to reward views only from registered users.
    • Enabling the "RewardOnlyLoggedUsersView" option helps prevent rewards from being granted to bots or automated systems.
  2. Video Ownership Verification:

    • Video ownership verification is performed to prevent video uploaders from earning money from their own content.
    • Rewards are not granted if the viewer is also the video owner.
    • To receive rewards, viewers must watch videos with registered user accounts other than the video owners.
  3. Wallet Balance Requirement:

    • To control the amount of reward money you can give, the site owner must have a balance in their wallet.
    • You can manage the owner's wallet by manually adding initial funds to it.
    • If the wallet has no balance, rewards will not be granted.

By default, the site owner is identified with the user database ID = 1. You can modify this value by adjusting the manualAddFundsTransferFromUserId setting in the YPTWallet plugin.

Verification Steps:

To ensure successful reward distribution, please follow these steps:

  1. Confirm that the YPTWallet plugin is enabled on your site.
  2. Ensure that the site owner has a balance in their wallet.
  3. Login with a user account different from the video owner.
  4. After watching a video with a different user account, check the video owner's wallet history to verify the reward transaction.

By following these guidelines, you can effectively set up and utilize both the MonetizeUser and Video Reward plugins on your site.

Clone this wiki locally