Security and Compliance

GDPR Compliance


Website integration

Adding Data on User’s Web Activity to Push

Create and send personalized web push campaigns depending on user’s web activity, such as checkout or abandoned cart. 

To do this, you need to send the appropriate event to the eSputnik and link a workflow to it. Let’s consider adding data on user’s web activity to push notifications on the Abandoned cart example.

Setting Up Abandoned Cart Notification

Sometimes multiple events are needed for a workflow to work correctly. For example, for the Abandoned Cart workflow, we need to pass 2 events:

  • the event of adding items to the cart, 
  • the purchase event so as not to send a reminder to those users who have already made a purchase.

Step 1. Transferring cart event to eSputnik

Add code before the closing tag into the eSputnik script that you install on your website. Place it on the Cart page (the event you transfer to eSputnik should correspond to the web page).

Code sample:

function sendEventForToken(pushToken) {
     es('sendEvent', 'abandoned_cart', pushToken, [{"param":"...", "value":"..."}, {...}, ...]);
es('getPushToken', sendEventForToken);

, where

  • abandoned_cart — event name
  • pushToken —  push token value
  • param_1, param_2 … param_n — event parameters
  • value_1, value_2 … value_n — event parameters’ values.

Step 2. Transferring purchase event

In order for the script to check whether customer completed their ordering or not, generate a purchase event. It will stop the running workflow if the purchase (payment) is completed successfully. To do this, you need to add the code line to the addresses collecting script (push-token) on the Thank you for ordering page:

function sendEventForToken(pushToken) {
es('sendEvent', 'Purchase', pushToken);
es('getPushToken', sendEventForToken);

The values of the variables is similar to the abandoned cart example.

Step 3. Creating a workflow

Build a workflow that will run on this event. It should contain such blocks:

  • Start (set up starting workflow by abandoned cart event)
  • Timer (set the waiting time for the purchase event)
  • Check event (Abandoned cart reminder that you have prepared in advance)
  • Web push (for no branch)
  • End block (for both branches)

Workflow scheme

Test the workflow for correct operation and activate it.

Any Questions?
We’re always happy to help!
Request a Callback
Fill in the form, and our specialists will call you back as soon as possible.
Request a Callback
Chat Support
We’re waiting for your questions!
Send a Chat Message
Contact the eSputnik support team
Send an Email