12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Apr 26, 2022

Median in WordPress

Sridhar Katakam

Median is a one-click screen share tool currently on sale at AppSumo.

It provides JavaScript code that can be placed on a webpage which allows you to view the screen of users viewing that page and interact.

The interaction options available are:

  • Display Cursor
  • Highlight
  • Take Control
  • Draw

There are several use-cases for Median one of which is for freelancers and agencies setting up sites using WordPress for their clients.

If your client needs your help with any aspect of the WordPress site whether that be on the backend (WP admin) or frontend, you can go to your Median account, see a list of all the visitors across all your sites where your Median’s code is present, click on your client’s session and view what they are viewing! Anytime your client navigates to a different portion of the site, your screen will be updated almost instantly to reflect their current page.

Median provides a toolbar having controls using which you can point your client to a specific element on the page by allowing them to see your cursor, draw freehand, send them a request to control their screen and when granted, actually have clicking and scrolling actions in your browser be transmitted to theirs.

Sample screenshots:

Client view:

Developer view:

Here’s how Median’s JavaScript code can be added to all the pages in the WordPress admin and/or frontend:

Install and activate Code Snippets plugin.

Go to Snippets → Add New.

Title: Load Median on WP admin and front end

Code:

// Print script before the closing body tag on the back end (WP admin).
add_action( 'admin_footer', 'wpdd_print_median_script' );

// Print script before the closing body tag on the front end.
add_action( 'wp_footer', 'wpdd_print_median_script' );

function wpdd_print_median_script() {
	echo '
	<script>
		// Median code here w/o the opening and closing script tags
	</script>
	';
}

Copy your Median script from https://app.hellomedian.com/install and paste it in the above.

If you have copied including <script> and </script>, select

<script>
	// Median code here w/o the opening and closing script tags
</script>

in the above and paste.

Ex.:

Set the snippet to run everywhere. Save changes and activate.

If you do not wish for the script to be added to WP admin, comment out

add_action( 'admin_footer', 'wpdd_print_median_script' );

like so:

// add_action( 'admin_footer', 'wpdd_print_median_script' );

That’s it!

For users of Advanced Scripts, here’s how you can add Median in WordPress:

Set wp_footer and admin_enqueue_scripts as the hooks.
tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right