How to build a fool proof AdSense revenue sharing model?

You question is really “how do I make my way work?” but “what is a good way to do this?” so, maybe I am missing something, but this seems overly complex to me. Assuming that “50%”, “55%”, etc. means “xx% of the revenue for those particular page loads”, why not just track single (I assume) page loads per author and apply the percentage at the end of the day when you cut the checks? All you really need is an author hit counter.

If an author has 50 “hits” and that author is level 1, the author gets paid for 25 impressions. A level 3 author would get paid for 30. What is left over goes to you, or so I assume. That kind-of seems like the breakdown you are trying to get with the random number and the if/elses, but, again, maybe I am just really confused.

That is certainly how I would approach this, unless given reason for something more complicated. Can’t help but feel like I am missing something. Are you sending this data to AdSense immediately on page load or something like that?

tech