SAREpush
  • INTRODUCTION
  • Platform Support
  • JAVASCRIPT LIBRARY
    • Installing library on website
    • Installing library through GTM
    • Tagging a subscriber using library
    • Preview subscriber's tags in our platform.
    • Sending shopping cart events using library
  • REST API
    • Introduction
    • Retrieving a list of websites
    • Retrieving JS code for specific website
    • Creating campaign to all subscribers
    • Creating campaign to particular locations
    • Creating campaign to particular tags
    • Creating campaign to particular segments
    • Sending message to specific subscriber
    • Sending message to test subscribers
    • Retrieving a list of segments
    • Retrieving a list of locations
    • Retrieving a list of tags
    • Retrieving a list of subscribers
  • PLUGINS
    • Installing WordPress plugin
  • CAMPAIGNS
    • Delivery automation
      • Welcome notification
      • When leave website
      • When visit specific web page
      • When spend X time on specific web page
    • Delivery to audience
      • Send to all subscribers
      • Send to particular segments
      • Send to particular tags
      • Send to test segment
    • Delivery scheduling
      • Send at a particular time
      • Sent recurring
    • Message personalization
    • Message preview
    • Message time to live
    • Images and icons
  • User management
    • User Management
    • Permission table
  • Product feed
    • What is XML Product Feed?
Powered by GitBook
On this page
  1. JAVASCRIPT LIBRARY

Sending shopping cart events using library

The following steps describe how to send cart events in website using library.

Update Cart

Workflow start when Update Cart event happens. This event can be triggered when the subscriber adds the product to the cart or visits products. Then the workflow will wait a specific period of time before sent.

<script>
    sarepush('updateCart', {}, function (response) {
        console.log(response);
    });
</script>

Additionally you can enrich the event with product data that can be used to personalize the message.

<script>
    sarepush('updateCart', {
        product_id: 99
        product_price: "23$"
        product_name: "Green t-shirt"
    }, function (response) {
        console.log(response);
    });
</script>

Complete Cart

You can stop the workflow by send Complete Cart event. Should be done when the subscriber buys products.

<script>
    sarepush('completeCart', {}, function (response) {
        console.log(response);
    });
</script>.

PreviousPreview subscriber's tags in our platform.NextIntroduction

Last updated 4 years ago

Message personalization