median-viewer
v3.9.4
Published
This package provides <median-viewer> and <median-connected-site-visitors>
Downloads
61
Readme
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.htmlOn 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.