This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script async="async" src=//consent.trustarc.com/notice?domain=tibco.com&c=teconsent&js=nj¬iceType=bb>m=1 crossorigin=""></script> | |
<script> | |
window.trustArcCookieCounter = 0; | |
window.firedTrustArcConsent = false; | |
//look for the existence of the trust arc cookie that indicates if it's implied or expressed consent | |
function checkForTrustArcCookie() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<!-- All the normal stuff that goes in the head tag (ideally jQuery is here so it can be used by T&T offers easily) --> | |
<script type="text/javascript" src="pathtothemboxjsfile.js"></script> | |
<script type="text/javascript"> | |
//object that contains any data you have about the customer on the server and want to pass to T&T | |
var customerInfo = { | |
}; | |
</script> | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mboxFactoryDefault.addOnLoad(function () { | |
var _appendSession = function (_tag) { | |
var _tags = document.getElementsByTagName(_tag); | |
for (var i = 0; i < _tags.length; i++) { | |
var _t = (_tag == 'form') ? _tags[i].action || '' : _tags[i].href || ''; | |
if (_t != '') { | |
if (_t.indexOf('avascript') == -1 && _t.indexOf('mboxSession=') == -1) { | |
var _glue = (_t.indexOf('?') > -1) ? '&' : '?'; | |
var _append = _glue + "mboxSession=" + mboxFactoryDefault.getSessionId().getId(); | |
(_tag == 'form') ? _tags[i].action += _append : _tags[i].href += _append |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//replace 1234 with your campaign | |
var u = user.activeCampaigns; | |
for(var i=0,l=u.length;i<l;i++){ | |
if(u[i] == 1234){ | |
return false | |
} | |
} | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//accepts an mbox and array of params (name -> value pairs) | |
var mboxTrackScroll = function (mboxName, params) { | |
//bind to the scroll event on the window | |
//namespace the event so we avoid unbinding other handlers | |
$(window).on('scroll.mboxScroll', function () { | |
//unbind the handler so we don't fire a gazillion mbox calls | |
$(this).unbind('scroll.mboxScroll'); |