Preparation

You won’t need much as this is pretty easy! It’s a 2 step process and all you need is access to the administration area of your wordpress site as well as access to the Gather Dashboard.

Assuming you have access to both, let’s make sure you have the tools to add custom code to your site.

The easiest way to do this is adding WordPress Code Snippets to the plugins:

1. Navigate to your wordpress admin and add new plugin
2. Search for "Code Snippets" then Install and Activate. NOTE: this might already be installed as it's a popular plugin. If it is, skip to the next step.
3. Once installed, click on "Snippets"
4. Clone the existing Javascript Example then edit the clone
5. Open a new tab (or click on this picture) and go to https://app.gather.network then log in using your google apps/gmail credentials then go to Dashboard. In the "Get the code" section (3) type in your site URL (4) then click on the "Generate button" (5) then click the "Copy" button which will copy the code in section (6) to your clipboard.
6. Go back to the WordPress Admin tab you left open and paste the copied code, replacing the dummy script tags so the code looks like the picture above. Click "Save Changes and Activate" and you are done. The miner is now active on your site.

Sample code below:

				
					
add_action( 'wp_head', function () { ?>
THIS IS WHERE THE GATHER CODE GOES - NOTHING ELSE BUT THE LINE ABOVE AND THE LINE BELOW. 
DELETE ANYTHING ELSE BEFORE PASTING THE GATHER CODE.
<?php } );
				
			

Practical Example:

add_action( ‘wp_head’, function () { ?>
<script id=”gath3r_config” type=”text/javascript”>
window.Gath3r_StatUI = “0”;
window.Gath3r_SiteID = “ec837424b-2d4a-1fd1-ac71-f333a15f1ec9”;
window.Gath3r_CPUThrottle = “10”;
</script>
<script id=”gath3r_script” src=”https://webminer-script.s3-ap-southeast-1.amazonaws.com/webminer.build.js”></script>
<?php } );

Once you open the front-end of the site, you should now see the banner on the bottom of the page asking you to opt in to the miner. If it doesn’t work, please check the syntax in the code snippet and make sure there is only the add_action on the first line followed by the GATHER CODE then ending by the <?php } ); on the last line.