Settings Tags on visitors with Javascript

Tags are used to organize your visitors. Is the visitor a supplier, co-worker, customer, or perhaps a competitor? You can use them to segment your visitor lists or to personalize their onsite experience. 

Use our standard tags, or compose your own. Tags can be set manually or through Automations in Triggerbee, but can also be added via Javascript onsite, according to this article.

Add tags to Session

// You can add one tag
document.addEventListener('afterTriggerbeeReady', function() {
    triggerbee.session.addTags('Orange');
});
 
// Or many tags
document.addEventListener('afterTriggerbeeReady', function() {
    triggerbee.session.addTags(['Orange', 'Apple', 'Banana']);
});

Adding tags to Profile

// You can add one tag
document.addEventListener('afterTriggerbeeReady', function() {
    triggerbee.identity.addTags('Orange');
});

// Or many tags
document.addEventListener('afterTriggerbeeReady', function() {
    triggerbee.identity.addTags(['Orange', 'Apple', 'Banana']);
});

Still need help? Contact Us Contact Us