After setting up Post Pay Counter to pay your writers for the visits their posts receive, you may want to tweak it so that you pay them for all the visits their posts record through all time, not just for the current month. This can be easily achieved with the help of the PRO version payment handling features. This tutorial will guide you through how to set up the payment flow in order to achieve that.
Selecting the right starting date (Analytics)
If you use Google Analytics as visits source, make sure you have selected the desired start day for visits. This can be done through the Update Analytics Data
feature in the Google Analytics/Adsense Status
box. For example, if you want to pay writers for views since the beginning of 2016, then you need to select 2016/01/01. You may well want to start counting visits since the day you installed the plugin, in which case just select that day (or don’t do anything, since that’s the default behavior).
The first pay day
At this point, stats will display revenues generated by the visits you decided to draw from Analytics.
Let’s think of Bob having earned $50 over that time, so we have a concrete example. We’ll also suppose that Bob’s revenue came from two posts: post A and post B, both published in May. The usual concern is “I’m going to pay Bob 50 bucks for this time range. This will settle past visits. But what about future ones? I need to pay Bob even for the visits post A and post B generate in June and July and all time afterwards.” This can be achieved.
Now, you pay Bob $50. The crucial step is that you mark that as paid through Post Pay Counter’s interface (if you pay with PayPal through the plugin, it does also automatically mark as paid). When you mark an author as paid, which automatically marks the corresponding posts as paid, you basically reset the due payment amounts to zero. After marking an author as paid, the Total Payment
field will still hold the original value (i.e. the total revenue since the beginning), while the Due Pay
field will be reset to zero.
Future pay days
Once you have marked Bob as paid, new revenue will start to accumulate in the Due Pay
column. When you are going to pay Bob again, visits/adsense revenues generated since the time you paid him will be included. The only thing you need to be careful about is to select a stats time range wide enough so that all posts you want to pay Bob for are included in it. In our case, since Post A and Post B were published in May, we’ll need to make sure that a time range that includes May is selected.
There is an apt setting to tweak the default stats time range, so you don’t have to take care every time: you can find it in Post Pay Counter > Options > Miscellanea > Default stats time range
. NOTE that the stats time range does not have any effect on visits time range. The visits/ads figures you see are always totals, there is no way to get visits numbers with a variable date range. The stats time picker only allows you to select what posts are displayed by tweaking the publication date range, but not what visits.
At this point, you simply need to iterate the process: every time you pay Bob, you mark him as paid, so that the Due Payment
counter is reset to zero, and new revenue starts to accumulate again from scratch, getting ready to be paid on the next batch. If the wide time range makes the stats page too slow or impossible to load, have a look at caching options.
Calculate payment from a monthly revenue value
If you want to pay your writers depending on each month income, you can couple the method above with an apt settings change each month. Have a look at this topic and this other topic for more details.
Why is there not a view for all posts that had visits this month?
Because it would drain your server’s resources. Think about it: when you have to display stats for this month, how can you know what posts had unpaid visits this month? You would basically have to go and check, one by one, what posts had visits this month. Again, this would require checking each and every post, which would kill your server every time the stats page was loaded.