npm.io
3.9.4 • Published 8 years ago

median-viewer

Licence
ISC
Version
3.9.4
Deps
7
Size
1.5 MB
Vulns
1
Weekly
0

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.