Integrating for Sending Right Messages at the Right Time

29 / Jul / 2016 by Tanu Siwag 0 comments

Email marketing present so many benefit over other traditional forms of marketing. It drives better returns on investment and customer engagement metrics than other marketing techniques because of Reduce Overhead Costs and Reduced Time and Efforts.

The old process for sending an email involves only one step as send an email, and that’s it. We have no idea what happens after that email is sent :

  • Did they receive it?
  • Did it get lost in their inbox?
  • Did they click on mail links?
  • Open mail attachments?

All these points can be taken into account by integrating just one third party service i.e. is a third party service that provides the facility to set trigger points for sending emails based on user events and Segmenting users using criteria.

Also using single trigger we can send a series of messages. And it automatically stop sending mails once the user stop matching trigger creteria. It also provide the flexibilty to trigger emails during a defined time period only. We can track user conversions by connecting every message to an action. And can measure the sucess of our email campain.

For integrating with web app, we have to follow few simple steps:

1. Register your site on and it will provide you a SITE-ID and SECRET-API-KEY along with a script

2. Add the script on every page of your site:
<script type="text/javascript">
var _cio = _cio || [];
(function() {
var a,b,c;
a=function(f){return function(){_cio.push([f]. concat(,0)))}};
var t = document.createElement(‘script’),
s = document.getElementsByTagName(‘script’)[0];
t.async = true; = ‘cio-tracker’;
t.setAttribute(‘data-site-id’, <SITE-ID>);
t.src = ‘’;
s.parentNode.insertBefore(t, s);

3. For the logged in user add following script on your page:
<script type="text/javascript">
id: <UNIQUE-USER_ID>, //Must be unique per user
email: <USER-EMAIL-ID>, //Email-Id of logged in user
created_at: <User_register_Timestamp>,//User Signup time
name: <USER-NAME> //Optional field
We can add as many attributes as we like.

4. In addition to user information, you may want to track user events like “purchased” or “subscribedToNotification”.
<script type="text/javascript">
[/java] also Provides APIs for creating user and add events to it.
curl -i ; \
-X PUT \
-d email=<USER-EMAIL-ID> \
-d name=<USER-NAME> \

curl -i \
-H ‘Content-Type:application/json’ \

Hope this help you to send right message at right time. 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *