PageSourceSearch

https://www.wilmingtontrust.com/content/dam/wtb-web/scripts/tealiumComponentCode.js

js wilmingtontrust.com collected 2026-10-02 04:01:41 UTC 3,538 bytes, 95 lines download raw bytes

1//START FORM CODE
2function tealiumWithFormSuccess(){
3	try{
4		utag.link({
5			tealium_event: document.querySelector("#tealiumEvent").value,
6			customLinkName: document.querySelector("#customLinkName").value,
7			componentName: document.querySelector("#componentName").value,
8			componentGuid: $('#aemformid').val()
9		});
10			
11	}catch(err){}
12}
13
14function tealiumWithFormFail(){
15	try{
16		utag.link({
17			tealium_event: document.querySelector("#tealiumEvent").value,
18			customLinkName: document.querySelector("#customLinkName").value,
19			componentName: document.querySelector("#componentName").value,
20			componentGuid: 'Server error'
21		});
22			
23	}catch(err){}
24}
25
26//END FORM CODE
27
28//START BUTTON CODE
29function fireAnalyticsEvent(b) {
30		if ($ctaButtonTagType === 'off') {
31			return;
32		}
33		var $ctaButtonComponent = b.parentElement;
34		var $ctaButtonLink = b;
35		var $ctaButtonId = $ctaButtonLink.attributes['id'].value;
36		
37		var $ctaButtonLinkText
38		
39		try {
40			$ctaButtonLinkText = document.querySelector("[data-component-id='"+ $ctaButtonId + "']").innerText;
41		}catch(err){
42			if(b.querySelector(".btn-text")){
43				$ctaButtonLinkText = b.querySelector(".btn-text").innerHTML;	
44			} else {
45				$ctaButtonLinkText = b.innerHTML;
46			}
47		}
48		
49		
50		var $ctaButtonTagType = $ctaButtonLink.hasAttribute('data-tag-type')? $ctaButtonLink.attributes['data-tag-type'].value:'';
51		var $ctaButtonTagTextOverride = $ctaButtonLink.hasAttribute('data-tag-text')? $ctaButtonLink.attributes['data-tag-text'].value:'' ;
52		var $ctaButtonTagProduct = $ctaButtonLink.hasAttribute('data-tag-product')? $ctaButtonLink.attributes['data-tag-product'].value:'';
53		var $ctaButtonTagProductOverride = $ctaButtonLink.hasAttribute('data-tag-product-override')? $ctaButtonLink.attributes['data-tag-product-override'].value:'';
54		var $ctaButtonTagConversionType = $ctaButtonLink.hasAttribute('data-tag-product-conversion')? $ctaButtonLink.attributes['data-tag-conversion'].value:'';
55		var $ctaButtonTagCategory = $ctaButtonLink.hasAttribute('data-tag-product-category')? $ctaButtonLink.attributes['data-tag-category'].value:'';
56		var $ctaButtonTagCritical = $ctaButtonLink.hasAttribute('data-tag-product-critical')? $ctaButtonLink.attributes['data-tag-critical'].value:'';
57		
58		var tealiumEvent = {
59			pageName: window.utag_data.pageName,
60			tealium_event: $ctaButtonTagType,
61			componentGuid: $ctaButtonId,
62			componentName: 'ctaButton',
63			customLinkName: $ctaButtonTagTextOverride ? $ctaButtonTagTextOverride : $ctaButtonLinkText
64		};
65
66		//If the tagging type is for Account Opening, set additional properties in the track object
67		if ($ctaButtonTagType === 'openAccountCta') {
68			tealiumEvent['productType'] = $ctaButtonTagProduct === 'other' ? $ctaButtonTagProductOverride : $ctaButtonTagProduct;
69			tealiumEvent['conversionType'] = $ctaButtonTagConversionType;
70			tealiumEvent['productCategory'] = $ctaButtonTagCategory;
71		}
72
73		Utils.tealium.trackEvent(tealiumEvent);
74	}
75
76
77
78
79window.addEventListener("load", function(){
80	$('a[href="#ScheduleAppointment$"]').attr('href', 'https://schedule.mtb.com/service');
81	
82	var $ctaButtonComponents = document.querySelectorAll('.btn[id]');
83	[].forEach.call($ctaButtonComponents, function (b) {
84		if (typeof $ctaButtonTagCritical != 'undefined') {
85			b.addEventListener('mousedown', function(){
86				fireAnalyticsEvent(b);
87			});
88		}else {
89			b.addEventListener('click', function(){
90				fireAnalyticsEvent(b);
91			});
92		}
93	});
94});
95//END BUTTON CODE

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.