0.9.3 • Published 6 years ago

@median/viewer v0.9.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

Median Viewer

This is a project for displaying a Median cobrowsing session inside your very own site!.

Getting Started

First, for your customers experience, add this code to identify a user:

Median.identify('<identifier-token>')

The identifer token can be anything - as long as it's unique to a particular user. You can use an internal User ID, the user's email, or a unique internal User Hash. We recommend using their email.

Next, add this script to your head

  • Put a script tag similar to this <script src='https://unpkg.com/median-viewer/dist/median-viewer.js'></script> in the head of your index.html
  • On your customers page, add this: Median.startSession('<identifier-token>'); And you will connect to your customers session.

  • That's it!

Methods

Median.startSession('');

Begins a session with your user.

Median.sessionStatus;

Returns a string that could be "ready", "waiting", or ""

Median.visitorProperties;

Returns an object that has details about your user.

Median.endSession();

Ends a session with your user.