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>
Last updated