Setting Tags through Javascript

Tags are used to organize your visits and 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. Tags can also be set directly through Javascript and through Iframe-loggingg, according to this article.

Add tags to current Session

Note: Please read our Scripting Guidelines before using the tag namespace.

Here's the namespace that can be used to set tags on the Triggerbee 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 current Contact

// 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']);
	});
Did this answer your question? Thanks for the feedback! Please reach out to [email protected] if there's anything you'd like to add. There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us