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

Tagging a subscriber using library

The following steps describe how to manage tags in website using library.

Add tags

Our library allow you to easily add tags to subscriber. To do so, insert the following code in your website. Remember that the data must be a valid object.

<script>
    //add one tag
    sarepush('addTags', {tagName: 'tagValue'}, function (response) {
        console.log(response);
    });
    
    //or multiple tags
    sarepush('addTags', {
        firstName: 'David',
        company: 'Google'
        uniqueId: 123456,
        otherTag: ''
    }, function (response) {
        console.log(response);
    });
</script>

Remove tags

SAREpush also allows you to remove tags from subscriber. To do so, insert the following code in your website. Remember that the data must be a valid array.

<script>
    //remove one tag
    sarepush('removeTags', ['firstName'], function (response) {
        console.log(response);
    });
    
    //or multiple tags
    sarepush('removeTags', ['firstName', 'company'], function (response) {
        console.log(response);
    });
</script>

It is possible to make calls to the library even before library is loaded.

PreviousInstalling library through GTMNextPreview subscriber's tags in our platform.

Last updated 4 years ago