Home / Admin / Add Subscriber to Segment with Duration
Duplicate Snippet

Embed Snippet on Your Site

Add Subscriber to Segment with Duration

Adds the subscriber to the segment for a specific duration, after the defined number of days the subscriber gets removed automatically.

Code Preview
js
var peSegmentNameWithDuration = []; // e.g, [{"name":"segmentName","duration": 5}]
window.PushEngage = window.PushEngage || [];
PushEngage.push(function() {
    PushEngage.addSegmentWithDuration(peSegmentNameWithDuration).then(function(data) {
        console.log(data)
    }).catch(function error(error) {
        console.log(error.message)
    });
});

Comments

Add a Comment