User Guide

Last updated: May 24, 2018

Introduction

This guide assumes that you have already created an Engagespot account and you have noted the required API credentials from your dashboard. If you haven't created an Engagespot account. Get one one for free by clicking the button below.

Sign Up

Installation

For Normal Websites

If you want to install Engagespot in a static/html website, follow this guide. Login to your Engagespot Dashboard. Goto Website Settings. There you will see the javascript code. You have to copy the code and paste it in the head section of your code. Remember to replace SITE_KEY with your actual site key which can be found in the website settings page.

Default code example:
<script>window.Engagespot={},q=function(e){return function(){(window.engageq=window.engageq||[]).push({f:e,a:arguments})}},f=["captureEvent","subscribe","init","showPrompt","identifyUser","clearUser"];for(k in f)Engagespot[f[k]]=q(f[k]);var s=document.createElement("script");s.type="text/javascript",s.async=!0,s.src="https://cdn.engagespot.co/EngagespotSDK.2.0.js";var x=document.getElementsByTagName("script")[0];x.parentNode.insertBefore(s,x);Engagespot.init('SITE_KEY');</script>

To know if you've succesfully installed Engagespot on your website, Just visit your website. If you see a bell icon, then you're done. Congrats.

Please note that web push notifications are only supported by Chrome and Firefox. Both Desktop and Android devices. iOS don't support web push notifications.

For Wordpress Websites

Installing Engagespot web push on a WordPress website is simple. You just have to download the Engagespot Web Push Notifications plugin and activate it. Then go to Engagespot menu in your WordPress dashboard and enter your API credentials.

Detailed guide on plugin installation can be found at Our Knowledgebease

For Magento

Installing Engagespot web push on a Magento website is simple. You just have to download the Engagespot Web Push Notifications extension to your Magento admin dashboard. Then go to Engagespot menu in your Magento dashboard and enter your API credentials.

REST API

Use Engagespot REST API for integrating advanced features like behaviour analytics to your account.

Authentication

Each API call should be authenticated using the header parameter API-Key. You can find your API Key from the website settings section on your Engagespot dashboard

curl -H "API-Key: <insert API Key here>" https://api.engagespot.co/2/campaigns
                                        

Send a new campaign POST

Use this API for creating and sending a new push notification campaign

API URL
https://api.engagespot.co/2/campaigns
Parameters
campaign_name string
Name of the campaign
notification JSON OBJECT
title string
Notification Title
message string
Notification Message
icon string
Notification Icon URL
url string
Notification URL
send_to string
Possible Values
everyone To send notifications to all your users.
identifiers If you want to send notifications to specific users based on the identifier you've mapped. Be sure to pass the identifiers in the identifiers parameter mentioned below.
identifiers JSON ARRAY of Identifiers. Use this only if you pass identifiers as the value to send_to parameter.

Eg: ['1628','9284','9164']

Capture Events POST

Use this API for capturing user events from your website

API URL
https://api.engagespot.co/2/events
Parameters
user_hash string
User hash obtained from cookie - _webPushUserHash
action string
A string representing the action
object JSON OBJECT id and name is mandatory. You can include any number of key value pairs
id string
Unqiue identifier
name string
Name for identification