This page is a reference for 3rd party developers interested in adding the PlusLink Plugin to a pregnancy center's web site.
The following requirements must be met to use the PlusLink Plugin
This is a basic template that displays the Plugin inline within a page. No bootstrap or jQuery required. It should work on most web sites by just cutting and pasting the code. Run Demo
Html Template
// put the iframe within the body tag of your html page.
<iframe id="pluginFrame" src="https://pluslinkplugin.ekyros.com" style="width: 100%; min-height: 800px;" frameborder="0"></iframe>
Javascript Template
// eKYROS PlusLink Plugin Script v2.0
<script>
window.addEventListener('DOMContentLoaded', function() {
// Get reference to plugin iframe contentWindow
var f = document.getElementById('pluginFrame').contentWindow;
// Setup plugin configuration data.
// (Note: your center will receive an apiKey and regKey(s) upon registering with
// the eKYROS Call Center in CenterPiece).
//
// Parameters:
// type: Message type should always be 'ekyros'
// apiKey: Identifies Call Center
// regKeys: Array that identifies 1 or more registered office locations.
// themeColor: Optional. Specify a primary color used by the plug-in to match your
// site's theme. Default is color 'blue'. Accepts hex value or named color.
// waitTimeInMinutes: Optional. Specify duration (in minutes) before the user can create
// another appointment. Default is 30 minutes.
// timeslotThrottleInDays: Optional. Limit the number of timeslots displayed.
// Valid value is between 1-30 days. Default is 30 days.
// hideCenterName: Optional. Hide center Name, address & phone.
// true/false. Default is false.
var data = {
"type": 'ekyros',
"apiKey": '41301EE0-560C-45B3-BC89-CD32C1B2EE36',
"regKeys": ['CB124A4C-7679-4F96-84C9-87CEA27F8891','066B9A8A-872C-4E42-8F0A-09F6551B209B','37431EB3-CE82-4FA6-8587-BF1E1A27C8AA'],
"themeColor": '#86A149',
"waitTimeInMinutes": 30,
"timeslotThrottleInDays": 10, // Show 10 days of timeslots (versus 30).
"hideCenterName": false
};
// Setup message listener to receive messages from the plugin.
window.addEventListener("message", function(e){
// Optional. Handle callback message when someone books an appointment
if (e.data.type == 'ekyros') {
// Do something like redirect to google analytics page etc...
window.location.href='https://my-site/my-google-analytics-page.html';
}
// Required! Handle initialization.
// Param1: Configuration data.
// Param2: Secuity requirement. Must be origin (domain) used in iframe SRC
// attribute.
if (e.data.type == 'ekyros-init') {
f.postMessage(data, "https://pluslinkplugin.ekyros.com");
}
});
});
</script>
This template is based on Bootstrap 4. Warning! Some experience required. This requires bootstrap 4 scripts and css to be installed on your web site. NOTE: This example loads the plugin in a bootstrap 4 DIALOG. Don't just copy and paste the code.
Html Template
<div id="myModal" class="modal fade" backdrop="static" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Schedule an Appointment</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<iframe id="modalFrame" src="https://pluslinkplugin.ekyros.com" style="width: 100%; min-height: 500px;" frameborder="0"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Javascript Template
<script>
// Register with the bootstrap dialog show event
$("#myModal").on("show.bs.modal", function () {
//get reference to iframe contentWindow
var f = $('#modalFrame')[0].contentWindow;
// Setup plugin configuration data.
// (note you will receive apiKey and regKey(s) upon registering with eKYROS callcenter
// in CenterPiece).
//
// Parameters:
// type: Message type should always be 'ekyros'
// apiKey: Identifies Call Center
// regKeys: Array that identifies 1 or more registered office locations.
// themeColor: Optional. Specify a primary color used by the plug-in to match your
// site's theme. Default is color 'blue'. Accepts hex value or named color.
// waitTimeInMinutes: Optional. Specify duration (in minutes) before the user can create
// another appointment. Default is 30 minutes.
// timeslotThrottleInDays: Optional. Limit the number of timeslots displayed.
// Valid value is between 1-30 days. Default is 30 days.
// hideCenterName: Optional. Hide center Name, address & phone.
// true/false. Default is false.
var data = {
"type": 'ekyros',
"apiKey": '41301EE0-560C-45B3-BC89-CD32C1B2EE36',
"regKeys": ["CB124A4C-7679-4F96-84C9-87CEA27F8891",
"066B9A8A-872C-4E42-8F0A-09F6551B209B",
"37431EB3-CE82-4FA6-8587-BF1E1A27C8AA"],
"themeColor": '#86A149',
"timeslotThrottleInDays": 10 // Show 10 days of timeslots (versus 30).
};
// Required! Handle initialization. The Plugin will request the configuration data
// upon initialization.
// Param1: Configuration data.
// Param2: Secuity requirement. Must be origin (domain) used in iframe SRC
// attribute.
f.postMessage(data, "https://pluslinkplugin.ekyros.com");
});
</script>
There may be times when you want the parent page to receive a notification from the Plugin when an appointment has been created. For example, you may want to redirect to a custom 'thank you' page on your site. You can easily accomplish this by registering a custom javascript function with the Plugin.
Javascript Template
<script>
// Add the following block of code to the bottom of the basic javascript
// template listed above, right below the f.postMessage() line.
window.addEventListener("message", function(e) {
// security check. make sure data type is from ekyros
if (e.data.type == "ekyros") {
// your custom javascript handler here
window.location.href = 'my-custom-web-page';
}
});
</script>
Yes, we provide support. No, we don't charge for support.
If you are a 3rd party web site developer needing help, contact us by phone or email (below). We'd be happy to help you out!
If you are a pregnancy center, please call your dedicated eKYROS account manager.
Yes, but you will need to purchase a subscription to the CenterPiece database. Appointments from the PlusLink Plugin automatically download directly into the CenterPiece Scheduler. If you are interested in learning more about CenterPiece and eKYROS please contact us at sales@ekyros.com or check out our web site at www.ekyros.com.