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.
1
<script>
2
//add one tag
3
sarepush('addTags', {tagName: 'tagValue'}, function (response) {
4
console.log(response);
5
});
6
7
//or multiple tags
8
sarepush('addTags', {
9
firstName: 'David',
10
company: 'Google'
11
uniqueId: 123456,
12
otherTag: ''
13
}, function (response) {
14
console.log(response);
15
});
16
</script>
Copied!

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.
1
<script>
2
//remove one tag
3
sarepush('removeTags', ['firstName'], function (response) {
4
console.log(response);
5
});
6
7
//or multiple tags
8
sarepush('removeTags', ['firstName', 'company'], function (response) {
9
console.log(response);
10
});
11
</script>
Copied!
It is possible to make calls to the library even before library is loaded.
Copy link
Contents