How to Mine Cruptocurrency via Browser - TutorialsteemCreated with Sketch.

in #coinhive7 years ago

 Installing Coin Hive Monero Miner in WordPress

If you haven't made an account already, go here. This step is literally as simple as installing Google Analytics. Somebody also already has created a coin-hive WordPress plugin on the official repository. Alternatively you can obviously just inject the following code into your WordPress theme:

<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
   var miner = new CoinHive.Anonymous('<site-key>');
   miner.start();
</script>

Obviously that’s pretty sneaky and it will suck everbodies laptop battery DRY when they spend more than a couple of minutes on your site, so please implement this with a dialoge (not unlike a cookie popup) and ask for permission to utilize their CPU. You can read the full documentation and throttling possibilities on the coin hive documentation.

CPU JavaScript Mining vs Ad Revenue

After 24 hours of mining the value at 1000 sessions (according to Google Analytics, so probably a couple more) is at around .70 USD / 0.01157 XMR and one comment complaining about the miner, which isn’t too bad considering that usually Ads take a lot of screen real estate.

What are the Hashrates of Monero with Coin Hive?

I’ve done preliminary tests with three devices, that probably resemble pretty well what people use out there, both a desktop and laptop that are a couple of years old and a next-to flagship smartphone.Devices tested on:

  • Mac Book Air (between 20 and 30 H/s)
  • Generic Desktop Machine (between 60 and 90 H/s)
  • OnePlus 3t (around 12 H/s)

So obviously, having your users mine for you makes most sense if they’re on a desktop device of whatever kind. Even though the frequencies and amount of cores are comparable between smartphones and PCs, the performance of a desktop CPU still beats laptops and smartphones.

Summary

A conversation I saw on twitter pointed out that compared to ads, that will just be displayed once, a client side miner gains value when a user remains on the page for a longer while, which counters the click bait trend a lot. 

Sort:  

Congratulations @priyanshanim! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published your First Post
You made your First Vote
You got a First Vote

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @priyanshanim! You have received a personal award!

1 Year on Steemit
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:

SteemitBoard knock out by hardfork

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @priyanshanim! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.17
JST 0.033
BTC 63989.15
ETH 2749.61
USDT 1.00
SBD 2.66