Splitting website earnings between two users
You need to set some of the variables to make it work with your account. The userID for your account is available when you first log in to the platform on the right hand side. SiteID1 and siteID2 are the two users to split earnings between. You could add more by adding else if statements. The siteID is the domain name for the website the code is going to be placed on. And the subID is an optional tracking variable if there is anything else you want to record.
The script works by calculating a random number between 0 and 1 and then setting the userID variable depending if that is higher or lower than 0.5. You can also adjust the percentages of the distribution of traffic by adjusting that figure.
Another way you could do this which would be more suited to splitting earnings between larger groups would be to use the API. You can set each user you want to track as a separate subID using the standard code from the platform. Then use API queries like the two below to pull balances and transfer funds across from the main account. This kind of system works well where a site is distributing a percentage of coins between the user base.
SubID Lookup API query:
Transfer API query:
For more information on the API please visit: https://jsecoin.com/api/