PageSourceSearch

https://vcm.com/etc.clientlibs/vcm/clientlibs/clientlib-analytics.min.js

js vcm.com collected 2026-10-02 03:06:10 UTC 42,833 bytes, 1,026 lines download raw bytes

1/* Adobe Launch loader + safe wrapper
2   - Detects existing Launch script tag (assets.adobedtm.com)
3   - If missing or failed, injects script with retries and exponential backoff
4   - After retries exhausted, performs one cache-busting recovery attempt
5   - Exposes `window.adobeLaunch` with `ready()` and `track(event)` helpers
6   - Usage: adobeLaunch.track('link click') or adobeLaunch.ready().then() 
7*/
8(function(window, document){
9    var DEFAULT_MAX_RETRIES = 3;
10    var DEFAULT_BASE_DELAY = 500; // ms
11    var RECOVERY_FLAG = '__launchRecoveryAttempted';
12
13    function now(){ return Date.now(); }
14
15    function findExistingScript(){
16        // look for known Adobe Launch host pattern
17        return document.querySelector('script[src*="assets.adobedtm.com"]');
18    }
19
20    function createScript(src, integrity, crossorigin){
21        console.log('[LaunchLoader] createScript:', src, integrity, crossorigin);
22        var s = document.createElement('script');
23        s.src = src;
24        if(integrity) s.setAttribute('integrity', integrity);
25        if(crossorigin) s.setAttribute('crossorigin', crossorigin);
26        s.setAttribute('data-adobe-launch-loader','true');
27        s.async = true;
28        return s;
29    }
30
31    function removeScript(el){
32        console.log('[LaunchLoader] removeScript', el && el.src);
33        try{ el.parentNode && el.parentNode.removeChild(el); }catch(e){ console.error('[LaunchLoader] removeScript error', e); }
34    }
35
36    function patchSatelliteTrack(){
37        if(window._satellite && typeof window._satellite.track === 'function' && !window._satellite.__launchLoaderPatched){
38            var originalTrack = window._satellite.track;
39            window._satellite.track = function(){
40                console.log('[LaunchLoader] _satellite.track called', arguments[0], arguments);
41                return originalTrack.apply(this, arguments);
42            };
43            window._satellite.__launchLoaderPatched = true;
44            console.log('[LaunchLoader] patched _satellite.track for runtime logging');
45        }
46    }
47
48    function wait(ms){ return new Promise(function(res){ setTimeout(res, ms); }); }
49
50    function addCacheBuster(url){
51        var separator = url.indexOf('?') === -1 ? '?' : '&';
52        return url + separator + 'cacheBust=' + Date.now();
53    }
54
55    function attemptRecovery(src, integrity, crossorigin){
56        return new Promise(function(resolve, reject){
57            // Check if recovery was already attempted to prevent infinite loops
58            if(window[RECOVERY_FLAG]){
59                console.error('[LaunchLoader] Recovery already attempted, skipping to prevent infinite loop');
60                return reject(new Error('Recovery already attempted'));
61            }
62
63            // Set the flag to prevent future recovery attempts
64            window[RECOVERY_FLAG] = true;
65            console.log('[LaunchLoader] Starting recovery attempt with cache-busting');
66
67            var cacheBustedSrc = addCacheBuster(src);
68            console.log('[LaunchLoader] Recovery URL:', cacheBustedSrc);
69
70            var recoveryScript = createScript(cacheBustedSrc, integrity, crossorigin);
71            recoveryScript.setAttribute('data-adobe-launch-recovery', 'true');
72
73            var handled = false;
74
75            recoveryScript.addEventListener('load', function(){
76                if(handled) return; handled = true;
77                console.log('[LaunchLoader] Recovery attempt: script loaded successfully');
78                setTimeout(function(){
79                    patchSatelliteTrack();
80                    if(window._satellite && typeof window._satellite.track === 'function'){
81                        console.log('[LaunchLoader] Recovery attempt: _satellite ready');
82                        resolve(window._satellite);
83                    } else {
84                        console.warn('[LaunchLoader] Recovery attempt: script loaded but _satellite missing');
85                        reject(new Error('Recovery: Launch loaded but _satellite not present'));
86                    }
87                }, 20);
88            });
89
90            recoveryScript.addEventListener('error', function(err){
91                if(handled) return; handled = true;
92                console.error('[LaunchLoader] Recovery attempt failed:', err && err.message ? err.message : err);
93                reject(new Error('Recovery attempt failed'));
94            });
95
96            document.head.appendChild(recoveryScript);
97        });
98    }
99
100    function loadWithRetries(options){
101        options = options || {};
102        var src = options.src;
103        var integrity = options.integrity;
104        var crossorigin = options.crossorigin || 'anonymous';
105        var maxRetries = typeof options.maxRetries === 'number' ? options.maxRetries : DEFAULT_MAX_RETRIES;
106        var attempt = 0;
107
108        return new Promise(function(resolve, reject){
109            var aborted = false;
110
111            function attemptLoad(){
112                if(aborted) return;
113                attempt++;
114                console.log('[LaunchLoader] attempt', attempt, 'of', maxRetries, 'to load Adobe Launch');
115
116                // if already present and loaded
117                if(window._satellite && typeof window._satellite.track === 'function'){
118                    console.log('[LaunchLoader] _satellite already available, resolving immediately');
119                    return resolve(window._satellite);
120                }
121
122                var existing = findExistingScript();
123                var script = null;
124
125                if(existing){
126                    console.log('[LaunchLoader] found existing Adobe Launch script', existing.src, 'loader-injected?', existing.getAttribute('data-adobe-launch-loader') === 'true');
127                    // Extract src from existing script if we don't have one yet
128                    if(!src && existing.src){
129                        src = existing.src;
130                        console.log('[LaunchLoader] extracted src from existing script:', src);
131                    }
132                }
133
134                if(existing && existing.getAttribute('data-adobe-launch-loader') === 'true'){
135                    script = existing;
136                } else if(existing && !existing.hasAttribute('data-adobe-launch-loader')){
137                    // attach listeners to the existing tag
138                    script = existing;
139                    // Check if script has already failed (CORS errors may not fire error events)
140                    // If script has error attribute or is marked as failed, treat as error
141                    if(existing.hasAttribute('data-launch-failed')){
142                        console.warn('[LaunchLoader] existing script marked as failed, treating as error');
143                        return onError(new Error('Existing script already failed'));
144                    }
145                } else {
146                    // inject new script
147                    if(!src){
148                        return reject(new Error('Adobe Launch src not provided and no existing script found in DOM'));
149                    }
150                    script = createScript(src, integrity, crossorigin);
151                    document.head.appendChild(script);
152                }
153
154                var handled = false;
155
156                function onLoad(){
157                    if(handled) return; handled = true;
158                    console.log('[LaunchLoader] script loaded, verifying _satellite');
159                    // Wait a tick for Launch to initialise
160                    setTimeout(function(){
161                        patchSatelliteTrack();
162                        if(window._satellite && typeof window._satellite.track === 'function'){
163                            console.log('[LaunchLoader] _satellite ready');
164                            resolve(window._satellite);
165                        } else {
166                            console.warn('[LaunchLoader] script loaded but _satellite missing');
167                            onError(new Error('Launch loaded but _satellite not present'));
168                        }
169                    }, 20);
170                }
171
172                function onError(err){
173                    if(handled) return; handled = true;
174                    console.warn('[LaunchLoader] load error', err && err.message ? err.message : err, 'attempt', attempt, 'of', maxRetries);
175                    
176                    if(script){
177                        var injected = script.getAttribute('data-adobe-launch-loader') === 'true';
178                        console.warn('[LaunchLoader] failed script details:', script.src, 'loader-injected?', injected, 'readyState', script.readyState);
179                        
180                        // DO NOT remove the script element after final retry failure
181                        // Preserve it to avoid DOM manipulation issues and allow recovery
182                        if(attempt < maxRetries){
183                            console.warn('[LaunchLoader] removing failed script for retry');
184                            removeScript(script);
185                            script = null;
186                        } else {
187                            console.warn('[LaunchLoader] preserving failed script element for recovery attempt');
188                        }
189                    }
190                    
191                    if(attempt < maxRetries){
192                        var delay = DEFAULT_BASE_DELAY * Math.pow(2, attempt-1);
193                        console.warn('[LaunchLoader] retrying in', delay, 'ms (attempt', attempt + 1, 'of', maxRetries, ')');
194                        wait(delay).then(attemptLoad);
195                    } else {
196                        console.error('[LaunchLoader] retries exhausted, initiating recovery attempt');
197                        
198                        // Perform ONE recovery attempt with cache-busting
199                        if(src){
200                            attemptRecovery(src, integrity, crossorigin)
201                                .then(function(satellite){
202                                    console.log('[LaunchLoader] Recovery attempt succeeded');
203                                    resolve(satellite);
204                                })
205                                .catch(function(recoveryErr){
206                                    console.error('[LaunchLoader] Recovery attempt failed, activating fallback');
207                                    reject(err || new Error('Adobe Launch failed after retries and recovery'));
208                                });
209                        } else {
210                            console.error('[LaunchLoader] No src available for recovery, activating fallback');
211                            reject(err || new Error('Adobe Launch failed after retries'));
212                        }
213                    }
214                }
215
216                // If script already exists and has completed loading in past, try resolving quickly
217                if(script && (script.readyState === 'complete' || script.readyState === 'loaded')){
218                    console.log('[LaunchLoader] existing script already finished loading, validating now');
219                    // give it a moment
220                    setTimeout(onLoad, 20);
221                    return;
222                }
223
224                if(script){
225                    script.addEventListener('load', onLoad);
226                    script.addEventListener('error', onError);
227                    
228                    // For existing scripts that may have already failed silently (CORS),
229                    // set a timeout to check if _satellite becomes available
230                    if(existing && !existing.hasAttribute('data-adobe-launch-loader')){
231                        var timeoutMs = 3000; // 3 second timeout for existing scripts
232                        console.log('[LaunchLoader] existing script detected, setting', timeoutMs, 'ms timeout to verify load');
233                        setTimeout(function(){
234                            if(handled) return;
235                            if(window._satellite && typeof window._satellite.track === 'function'){
236                                console.log('[LaunchLoader] existing script verified via timeout check');
237                                onLoad();
238                            } else {
239                                console.warn('[LaunchLoader] existing script timeout: _satellite not available after', timeoutMs, 'ms');
240                                onError(new Error('Existing script failed to load within timeout'));
241                            }
242                        }, timeoutMs);
243                    }
244                }
245
246                // If script has async and may already be in flight, browser might not fire error/load until later
247            }
248
249            attemptLoad();
250        });
251    }
252
253    // Public facade
254    var facade = (function(){
255        var loadPromise = null;
256
257        function ensureLoaded(opts){
258            if(window._satellite && typeof window._satellite.track === 'function'){
259                console.log('[LaunchLoader] ensureLoaded: _satellite already present, resolving');
260                return Promise.resolve(window._satellite);
261            }
262            if(!loadPromise){
263                console.log('[LaunchLoader] ensureLoaded: starting loader promise');
264                // derive options from existing script tag if not provided
265                opts = opts || {};
266                var existing = findExistingScript();
267                if(!opts.src && existing) opts.src = existing.src;
268                if(!opts.integrity && existing) opts.integrity = existing.getAttribute('integrity');
269                if(!opts.crossorigin && existing) opts.crossorigin = existing.getAttribute('crossorigin') || 'anonymous';
270                loadPromise = loadWithRetries(opts);
271                // keep promise but don't let rejection bubble unless caller handles it
272                loadPromise.catch(function(err){
273                    console.error('[LaunchLoader] Final fallback activated: Adobe Launch could not be loaded after retries and recovery');
274                    console.error('[LaunchLoader] Error details:', err && err.message ? err.message : err);
275                    console.log('[LaunchLoader] Fallback mode: window.adobeLaunch.ready() and window.adobeLaunch.track() will continue to work but events will be dropped');
276                    loadPromise = null;
277                });
278            } else {
279                console.log('[LaunchLoader] ensureLoaded: returning existing loader promise');
280            }
281            return loadPromise;
282        }
283
284        function track(eventName){
285            console.log('[LaunchLoader] track requested:', eventName, 'window._satellite?', !!window._satellite, 'window.adobeLaunch?', !!window.adobeLaunch);
286            return ensureLoaded().then(function(){
287                try{
288                    if(window._satellite && typeof window._satellite.track === 'function'){
289                        console.log('[LaunchLoader] forwarding track to _satellite:', eventName);
290                        window._satellite.track(eventName);
291                    } else {
292                        console.warn('[LaunchLoader] Adobe Launch not available; dropping event:', eventName);
293                    }
294                }catch(e){
295                    console.error('Error calling _satellite.track:', e);
296                }
297            }).catch(function(err){
298                console.error('[LaunchLoader] failed to track event due to loader error:', eventName, err && err.message ? err.message : err);
299            });
300        }
301
302        return {
303            ready: function(opts){ return ensureLoaded(opts); },
304            track: track
305        };
306    }());
307
308    // expose globally
309    window.adobeLaunch = facade;
310
311    // kick off load automatically after DOM is ready to ensure script tag is parsed
312    // This prevents "Adobe Launch src not provided" error when loader runs before HTML is parsed
313    if(document.readyState === 'loading'){
314        document.addEventListener('DOMContentLoaded', function(){
315            try{ facade.ready(); }catch(e){/*ignore*/}
316        });
317    } else {
318        // DOM already ready, load immediately
319        try{ facade.ready(); }catch(e){/*ignore*/}
320    }
321
322})(window, document);
323
324$(document).ready(function() {
325    let isAuthor = $("#isAuthor").val() || "false";
326    var baseUrl = document.location.origin;
327    var currentPageName = $("#currentPageName").val() || "";
328    var parentPageName = $("#currentPageParentName").val() || "";
329    var pageHeirarchy = $("#pageHeirarchy").val() || "";
330    var pageType = $("#pageType").val() || "";
331    var sectionName = parentPageName + '|' + currentPageName;
332    var currentPageTitle = $("#currentPageTitle").val() || "";
333    var currentPagePath = window.location.pathname.slice(1).replace(/\//g, '|').replace('.html', '');
334    var currentURL = window.location.href.split('?')[0];
335    var previousPageName = localStorage.getItem("currentPageName");
336    var pagePercent = "";
337    var searchTerm = "";
338    var searchCount = "";
339    var pagePercentage = localStorage.getItem("pagePercentage") || "";
340    var siteError = "";
341    var searchInput = $('.has-search').find('.form-control');
342    var scrolled = false;
343    var pageReferrer = localStorage.getItem("currentPageUrl");
344    var lastScrollTop = 0;
345    var roundScroll = $(this).scrollTop();
346    currentPagePath = titleCase(titleCase(currentPagePath, "|"), "-");
347
348    //setting page percentage on scroll where default value is 25%
349    if (!scrolled) {
350        localStorage.setItem("pagePercentage", "25%");
351    }
352    $(document).scroll(function(e) {
353
354        scrolled = true;
355        var scrollAmount = $(window).scrollTop();
356        var documentHeight = $(document).height();
357        var windowHeight = $(window).height();
358        var scrollPercent = (scrollAmount / (documentHeight - windowHeight)) * 100;
359        var roundScroll = Math.round(scrollPercent);
360
361        $(".scroll").css("width", (scrollPercent + '%'));
362        if (roundScroll > lastScrollTop) {
363            if (roundScroll >= 0 && roundScroll <= 25) {
364                localStorage.setItem("pagePercentage", "25%");
365            } else if (roundScroll >= 26 && roundScroll <= 50) {
366                localStorage.setItem("pagePercentage", "50%");
367            } else if (roundScroll >= 51 && roundScroll <= 75) {
368                localStorage.setItem("pagePercentage", "75%");
369            } else {
370                localStorage.setItem("pagePercentage", "100%");
371            }
372            lastScrollTop = roundScroll;
373        }
374    });
375
376    //setting up current page name
377    if (!currentPagePath.length) {
378        currentPagePath = currentPageTitle;
379    } else if (sectionName.indexOf("errors") != -1) {
380        currentPagePath = "Error Page";
381    }
382
383    //setting up current page type
384    if (currentURL.indexOf("about-victory") !== -1) {
385        pageType = "About Victory Capital";
386    } else if (currentURL.indexOf("products") !== -1) {
387        pageType = "Products";
388    } else if (currentURL.indexOf("investment-franchise") !== -1) {
389        pageType = "Investment Franchise";
390    } else if (currentURL.indexOf("advice-tools") !== -1) {
391        pageType = "Advice and Tools";
392    } else {
393        pageType = "General";
394    }
395    //setting the previouse page name to typed/bookmarked when not referred from any other page.
396    if (currentPagePath.length) {
397        localStorage.setItem("currentPageName", currentPagePath);
398    }
399    if (currentURL.length) {
400        localStorage.setItem("currentPageUrl", currentURL);
401    }
402
403    //uppercasing for pagename
404    function titleCase(str, delimiter) {
405        var splitStr = str.split(delimiter);
406        for (var i = 0; i < splitStr.length; i++) {
407            // You do not need to check if i is larger than splitStr length, as your for does that for you
408            // Assign it back to the array
409            splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
410        }
411        // Directly return the joined string
412        return splitStr.join(delimiter);
413    }
414
415	//setting up page referred to default value on page reload and on no click for navigation from previous page.
416    if (performance.navigation.type == performance.navigation.TYPE_RELOAD || (previousPageName == null && pageReferrer == null)) {
417        previousPageName = "";
418        pageReferrer = "Typed/Bookmarked";
419    }
420
421    //digital data json 
422    digitalData = {
423        version: "1.0",
424        page: {
425            pageInfo: {
426                PageName: currentPagePath,
427                Section: sectionName,
428                pageDocumenttitle: currentPageTitle,
429                pageURL: currentURL,
430                previousPagename: previousPageName,
431                pagePercentage: pagePercentage,
432                pageRef: pageReferrer,
433                pageType: pageType,
434                pageHier: pageHeirarchy,
435                siteError: siteError,
436                modulelog: 'prelogin'
437            },
438            search: {
439                internalSearchresults: searchCount,
440                internalSearchterm: searchTerm
441            }
442        },
443        user: {
444            userInfo: {
445                customerType: "prospect"
446            }
447        }
448
449    }
450
451    function logAnalytics(message, details){
452        console.log('[SiteAnalytics] ' + message, details || '');
453    }
454
455    function safeTrack(eventName){
456        logAnalytics('safeTrack requested', eventName);
457        if(window.adobeLaunch && typeof window.adobeLaunch.track === 'function'){
458            window.adobeLaunch.track(eventName);
459        } else if(window._satellite && typeof window._satellite.track === 'function'){
460            console.warn('[SiteAnalytics] adobeLaunch unavailable, using _satellite fallback', eventName);
461            window._satellite.track(eventName);
462        } else {
463            console.error('[SiteAnalytics] no tracking object ready for', eventName);
464        }
465    }
466
467    /*search tracking functionality
468    if ($('#search-term').length) {
469        setSearchResult();
470    }
471    searchInput.keypress(function() {
472        var keycode = (event.keyCode ? event.keyCode : event.which);
473        if (keycode == '13') {
474            setSearchResult();
475        }
476    }); 
477    $('#txt-search').on('autocompleteselect', function(e, ui) {
478        setSearchResult();
479
480    });*/
481
482    function setSearchResult() {
483        setTimeout(function() {
484            if ($('#search-term').length) {
485                searchTerm = $('#search-term').text();
486                searchCount = $(".search-results").length;
487                $(digitalData).each(function() {
488                    this.page.search.internalSearchterm = searchTerm;
489                    this.page.search.internalSearchresults = searchCount;
490                });
491            }
492        }, 1000);
493    }
494
495    //getting link name on click of the link
496    $(".iracomparison .st-green-badge-btn, .subnav, .top_menu_cont a, .menubottom a, .signinBox a, .investor-type .nav-link, .corporate-head a, .piechart .st-arrow-link-blue, .contactVC__container a, .investmentoptions .st-arrow-right, #performance-tabs ul li, .learningresource .navigation-right a, .timeline-navigation-btn a, .footer__text a").on('click', function() {
497        var signattr = $(this).attr('aria-label');
498        var linkname = $(this).text();
499        var href = $(this).attr('href');
500        if(href != null && typeof href != "undefined" && href.indexOf(".pdf")>-1){
501            digitalData.download = {
502                name: linkname,
503                pageName: currentPagePath
504            }
505            _satellite.track('download');
506        }else{
507            if (undefined != signattr && signattr == "Sign In / Register") {
508                linkname = signattr;
509            }
510            digitalData.link = {
511                name: linkname,
512                pageName: currentPagePath
513            }
514            console.log('@@@ 3')
515            logAnalytics('click handler firing', { linkName: linkname, href: href });
516            safeTrack('link click');
517        }
518    });
519
520    $('.etfleavingpopup .accept').click(function(){
521        var linkname = "EFT_leaving_" +"_"+ $(this).text();
522        digitalData.link = {
523            name: linkname,
524            pageName: currentPagePath
525        }
526        logAnalytics('click handler firing', { linkName: linkname, type: 'EFT_leaving' });
527        safeTrack('link click');
528    });
529    $(document).on("click",'.institutionalPopup .accept' , function(){
530        var linkname = "Institutional Investor" +"_"+ $(this).text();
531        digitalData.link = {
532            name: linkname,
533            pageName: currentPagePath
534        }
535        logAnalytics('click handler firing', { linkName: linkname, type: 'institutional accept' });
536        safeTrack('link click');
537    });
538    $(document).on("click",'.institutionalPopup .cancel' , function(){
539        var linkname = "Institutional Investor" +"_"+ $(this).text();
540        digitalData.link = {
541            name: linkname,
542            pageName: currentPagePath
543        }
544        logAnalytics('click handler firing', { linkName: linkname, type: 'institutional cancel' });
545        safeTrack('link click');
546    });
547    $('.vcmleavingpopup .accept').click(function(){
548        var linkname = "VCM_leaving_" +"_"+ $(this).text();
549        digitalData.link = {
550            name: linkname,
551            pageName: currentPagePath
552        }
553        logAnalytics('click handler firing', { linkName: linkname, type: 'VCM_leaving' });
554        safeTrack('link click');
555    });
556	setTimeout(function(){
557        $('.dt-buttons .dt-button').click(function(){
558            var linkname = "Index Daily Highest Value" +"_"+ $(this).text();
559            digitalData.download = {
560                name: linkname,
561                pageName: currentPagePath
562            }
563            _satellite.track('download');
564        });
565    }, 1500);
566
567    $('.herobanner .navigation-right a, .learningresource .card-image-hdng-small a').click(function(){
568		var label = $(this).attr('aria-label');
569		var href = $('.herobanner .navigation-right a').attr('href');
570
571        if(href.indexOf(".pdf")>-1){
572            var pdfname = href.substring(href.lastIndexOf("/") + 1, href.length).replace('.pdf', '');
573            var linkname = "banner_"+ pdfname + '_' +$(this).children().not( ".sr-only" ).text();
574            digitalData.download = {
575                 name: linkname,
576                 pageName: currentPagePath
577             }
578             _satellite.track('download');
579        } else {
580            var linkname = "banner_"+$(this).children().not( ".sr-only" ).text();
581            digitalData.link = {
582                    name: linkname,
583                    pageName: currentPagePath
584            }
585            _satellite.track('link click');
586        }
587    });
588    
589    $(document).on("click", ".rawHtml .tableFunds a", function(){
590        if ($('.flex.dt-ctnt-kid').length > 0) {
591            var row = $(this).parents('.flex.dt-ctnt');
592            var rowName = $(row).find('.flex.dt-ctnt-kid a')[0].text;
593            var linkname = rowName+'_'+$(this).attr('title');
594            console.log(linkname);
595            if($(this).attr('href').indexOf(".pdf")>-1){
596                 digitalData.download = {
597                     name: linkname,
598                     pageName: currentPagePath
599                 }
600                 _satellite.track('download');
601            }
602        } else {
603            var linkname = $(this).text();
604            digitalData.link = {
605                name: linkname,
606                pageName: currentPagePath
607            }
608            _satellite.track('link click');
609        }
610    	/*var linkname = $(this).text();
611        digitalData.link = {
612            name: linkname,
613            pageName: currentPagePath
614        }
615        _satellite.track('link click');   */
616    });
617    
618   /* $(document).on("click", ".rawHtml .tableFunds .flex.dt-ctnt-kid a", function(){
619    	var row = $(this).parents('.flex.dt-ctnt');
620    	var rowName = $(row).find('.flex.dt-ctnt-kid a')[0].text;
621    	var linkname = rowName+'_'+$(this).attr('title');
622    	console.log(linkname);
623    	if($(this).attr('href').indexOf(".pdf")>-1){
624             digitalData.download = {
625                 name: linkname,
626                 pageName: currentPagePath
627             }
628             _satellite.track('download');
629        } else {
630            digitalData.link = {
631                name: linkname,
632                pageName: currentPagePath
633            }
634            _satellite.track('link click');
635        }
636    });*/
637    
638    $('.herobanner .investortype a').click(function() {
639        var linkname = "hero_" + $(this).text();
640        digitalData.link = {
641            name: linkname,
642        }
643        _satellite.track('link click');
644    });
645    $('.news-media-block .news-details a, .load-more-in-the-media').click(function() {
646        var linkname = "media_" + $(this).text();
647        digitalData.link = {
648            name: linkname,
649        }
650        _satellite.track('link click');
651    });
652    //getting links for audience selector popup
653    $('#audience-selector-popup a').each(function() {
654        $(this).click(function() {
655            var userType = $(this).attr('data-usertype');
656            var str = $('.popup').attr('data-target-link').replace('.html', '');
657            if (str.indexOf("[{") >= 0) {
658                var linkname = str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("\""));
659            } else {
660                var linkname = str.substring(str.lastIndexOf("/") + 1, str.length);
661            }
662            var linkDocumentName = currentPageTitle + "_" + linkname + "_investor_type_" + $(this).text();
663            digitalData.link = {
664                name: linkDocumentName,
665                pageName: currentPagePath
666            }
667            _satellite.track('link click');
668        });
669
670    });
671    $('.st-product-box').click(function() {
672        var linkname = "RetirementFunds_" + $(this).attr('data-bx-value');
673        digitalData.link = {
674            name: linkname,
675            pageName: currentPagePath
676        }
677        _satellite.track('link click');
678    });
679
680
681    $('.alltopics .list-group-item a').click(function(){
682		var linkname = "blog_alltopic_" + $(this).text();
683        digitalData.link = {
684            name: linkname,
685            pageName: currentPagePath
686        }
687        _satellite.track('link click');
688    });
689
690    $('.st-retirement-overlay .st-green-badge-btn').click(function() {
691        var overlayText = $('.st-retirement-overlay').attr('data-bx-ol-value').replace('_overlay', '');
692        var linkname = "RetirementFunds_" + overlayText + "_" + $(this).text();
693        digitalData.link = {
694            name: linkname,
695            pageName: currentPagePath
696        }
697        _satellite.track('link click');
698    });
699
700    $('.timeline--contentBlock #prev.navigationLinksButton a').click(function() {
701        var linkname = "previous_timeline_" + $('#timeline .selected').text();
702        digitalData.link = {
703            name: linkname,
704            pageName: currentPagePath
705        }
706        _satellite.track('link click');
707    });
708    $('.timeline--contentBlock #next.navigationLinksButton a').click(function() {
709        var linkname = "next_timeline_" + $('#timeline .selected').text();
710        digitalData.link = {
711            name: linkname,
712            pageName: currentPagePath
713        }
714        _satellite.track('link click');
715    });
716
717    $('.fund-buttons a').click(function(){
718        //var dropdown = $('.productSelectBox .fundDropDown').text();
719        var heading = $('.productdetaildatainfo .fund-name').text();
720        var linkname = heading + "_" + $(this).text().trim();
721        digitalData.link = {
722            name: linkname,
723            pageName: currentPagePath
724        }
725        _satellite.track('link click');
726    });
727    $('input[type="search"], .searchIcon .call-image, .search-form-group input, .searchfunds').click(function() {
728        var linkname = "search";
729        digitalData.link = {
730            name: linkname,
731            pageName: currentPagePath
732        }
733        _satellite.track('link click');
734    });
735
736    $('#KJECommandButtons input').click(function() {
737        var linkname = $(this).val();
738        digitalData.link = {
739            name: linkname,
740            pageName: currentPagePath
741        }
742        _satellite.track('link click');
743    });
744
745    $('.st-cmp-social-media li a').click(function() {
746        var linkname = 'share_' + $(this).children("img").attr('alt');
747        digitalData.link = {
748            name: linkname,
749            pageName: currentPagePath
750        }
751        _satellite.track('link click');
752    });
753
754	$('#blog-search').keypress(function() {
755        var searchText = "search_blog_" + $(this).val();
756        var keycode = (event.keyCode ? event.keyCode : event.which);
757        if (keycode == '13') {
758            digitalData.link = {
759            name: searchText,
760            pageName: currentPagePath
761        }
762        _satellite.track('link click');
763        }
764    });
765
766    $('.cmp-text a').click(function() {
767        var href = $(this).attr('href');
768        if(href.indexOf('contact-us') > -1){
769            var linkname = $.trim($(this).text());
770			digitalData.link = {
771                name: linkname,
772                pageName: currentPagePath
773            }
774            _satellite.track('link click');
775        }
776    });
777
778    $('.franchiseBlock .navigation-right a').click(function() {
779        var linkname = "home_investment_franchise_learnmore" + "_" + $(this).text();
780		digitalData.link = {
781            name: linkname,
782            pageName: currentPagePath
783        }
784        _satellite.track('link click');
785    });
786
787	$('.flex.dt-ctnt-kid a').click(function(){
788        if($(this).attr('link_type') != undefined && $(this).attr('link_type') == 'fund_link'){
789            var linkname = $(this).text();
790            digitalData.link = {
791                name: linkname,
792                pageName: currentPagePath
793            }
794            _satellite.track('link click');
795        }else{
796            var ticker = $(this).attr('ticker'); 
797            var linkname = $('#_'+ticker).text() + "_" + $(this).attr('content_type') + "_pdf";
798            console.log(linkname);
799            digitalData.link = {
800                name: linkname,
801                pageName: currentPagePath
802            }
803            _satellite.track('link click');
804        }
805    });
806  
807    $(document).on('click','.productAccordion .card-body.show a', function(e) {
808    	var accordionParent = $(this).parents('.productAccordion');
809    	var title = $(accordionParent).find('div.card-header a.card-title')[0].text;
810		var linkname = currentPageName + "_" + title +"_"+$.trim($(this).text());
811		console.log(linkname);
812        digitalData.link = {
813            name: linkname,
814            pageName: currentPagePath
815        }
816        _satellite.track('link click');
817    });
818    $('.franchiseBlock .intro-bg-content-wrapper a').click(function(){
819        var franchiseName = "";
820        franchiseName = $(this).attr('aria-label');
821        var str = franchiseName.replace('View ', '');
822        var linkname = str + "_" + $(this).text();
823        digitalData.link = {
824            name: linkname,
825            pageName: currentPagePath
826        }
827       _satellite.track('link click');
828    });
829
830    //getting download name on click of download link
831    $('.fundFactSheet, .st-policy-pdf-link a, .pdf-icon').click(function() {
832
833        var downloadname = $(this)[0].childNodes[0].nodeValue;
834        var fundTitle = $('.product-details-component .fund-name');
835        if(fundTitle.length){
836			downloadname = fundTitle.text() +"_"+downloadname;
837        }
838        digitalData.download = {
839            name: downloadname,
840            pageName: currentPagePath
841        }
842        _satellite.track('download');
843    });
844    $(document).on("change", ".etflist .filter-body input.styled-checkbox", function(){
845		var linkname = "products_fa_victoryshares_etfs_list_filter_" + $(this).val();
846        digitalData.link = {
847            name: linkname,
848            pageName: currentPagePath
849        }
850        _satellite.track('link click');
851
852	});
853    $(document).on("change",  ".strategylist .filter-body input.styled-checkbox", function(){
854		var linkname = "solutions_strategies_list_filter_" + $(this).val();
855        digitalData.link = {
856            name: linkname,
857            pageName: currentPagePath
858        }
859        _satellite.track('link click');
860	});
861    $(document).on("click",  ".fundlist .mutualfunds-container .accordion .filter-list li.filter-text label", function(){
862    	 
863    	var linkname = "mutual_fund_list_filter_" + $(this).text();
864    	
865    	if(window.location.pathname.includes('/products-fa/')){
866    		linkname = "mutual_fund_filter_" + $(this).text();
867		}
868        
869    	digitalData.link = {
870            name: linkname,
871            pageName: currentPagePath
872        }
873        _satellite.track('link click');
874	});
875    
876
877    $(window).on('searchAjaxCompleted', function (e) {
878        if ($('#search-term').length) {
879            searchTerm = $('#search-term').text();
880            searchCount = $(".search-results").length;
881            $(digitalData).each(function() {
882                this.page.search.internalSearchterm = searchTerm;
883                this.page.search.internalSearchresults = searchCount;
884            });
885        }
886    });
887    
888});
889
890$(window).on("load", function() {
891
892    var checkboxVal = "";
893
894   /* if ($('#search-term').length) {
895        var searchTerm = $('#search-term').text();
896        var searchCount = $(".search-results").length;
897        $(digitalData).each(function() {
898            this.page.search.internalSearchterm = searchTerm;
899            this.page.search.internalSearchresults = searchCount;
900        });
901    }*/
902     $('.st-donut-desc-wrap a').click(function(){
903		var linkname = $(this).parents('.st-chart-container .donut_content').find('.donut_header').text() + "_" + $(this).text();
904		digitalData.link = {
905            name: linkname,
906            pageName: currentPagePath
907        }
908        _satellite.track('link click');
909    });
910
911    $("select.fundDropDown").change(function(){
912        var fundName = $('.productdetaildatainfo .fund-name').text();
913        var linkname = fundName + "_" + $(this).children("option:selected").val();
914        digitalData.link = {
915            name: linkname,
916            pageName: currentPagePath
917        }
918        _satellite.track('link click');
919
920    });
921    setTimeout(function(){
922				if($('.learnmorefilter').length > 0 || $('.bloglisting').length > 0 ){
923			        if(typeof digitalData !== 'undefined'){
924			         $(digitalData).each(function() {
925			             if(window.location.href.indexOf("/insights") > -1){
926			                 this.page.pageInfo.bloginsightsfilter = "default";
927			             }
928			             else if(window.location.href.indexOf("/resources") > -1){
929							 this.page.pageInfo.blogresourcefilter = "default";
930			             }
931			             else if(window.location.href.indexOf("/blog") > -1){
932							 this.page.pageInfo.blogfilter = "default";
933			             }
934			             else{
935			             	this.page.pageInfo.learningcenter = "default";
936			             }
937			         });
938			
939			        $('input[type="checkbox"]').each(function() {
940			            if ($(this).is(':checked')) {
941			                checkboxVal += $(this).val() + "|";
942			            }
943			        });
944			    
945			        checkboxVal = checkboxVal.substr(0, checkboxVal.length - 1);
946			        if (checkboxVal.length) {
947			            $(digitalData).each(function() {
948			                if(window.location.href.indexOf("/insights") > -1){
949			                 	this.page.pageInfo.bloginsightsfilter = checkboxVal;
950			                }
951			                else if(window.location.href.indexOf("/resources") > -1){
952								this.page.pageInfo.blogresourcefilter = checkboxVal;
953			             	}
954			                else if(window.location.href.indexOf("/blog") > -1){
955								this.page.pageInfo.blogfilter = checkboxVal;
956			             	}else{
957			                    this.page.pageInfo.learningcenter = checkboxVal;
958			                }
959			            });
960			        }
961			        }
962			    }
963    }, 2000);
964
965   /*  $('.bloglisting .check_box').click(function(){
966    	
967    	var checkval = "blog_filterbytopic";
968    		
969    	$('.bloglisting input[type="checkbox"]').each(function (index,item) {
970			let key = $(item).val();
971			let value = $(item).is(':checked');
972			if(value == true){
973				checkval = checkval+'_'+key;
974			}
975		});
976    	console.log(checkval);
977        digitalData.link = {
978            name: checkval,
979            pageName: currentPagePath
980        }
981        _satellite.track('link click');
982    }); */
983    $(document).on("click", ".textimageCTA .btn-primary, .card__content a, .textimageCTA a", function(){
984        var arialabel = $(this).attr('aria-label');
985        var href = $(this).attr('href');
986        var link_text  =  $(this).clone().children().remove().end().text();
987        if (link_text == "" || link_text == null) {
988            link_text = $(this).children().not( ".sr-only" ).text();
989        }
990        var heading_without_greenborder = $(this).siblings('.blueHdng-without-greenBorder');
991        var heading_greenborder = $(this).siblings('.blueHdng-multiLine-greenBorder');
992        var heading_blog = $(this).parent().prevAll("h3:first");
993        if (undefined != heading_without_greenborder && heading_without_greenborder.text().length) {
994            linkname = heading_without_greenborder.text() + '_' + link_text;
995        }else if(undefined != heading_greenborder && heading_greenborder.text().length){
996            linkname = heading_greenborder.text() + '_' + link_text;
997        }
998        else if(undefined != heading_blog && heading_blog.text().length){
999			linkname = heading_blog.text() + "_" + link_text;
1000        }else {
1001            linkname = link_text;
1002        }
1003        if(href.indexOf(".pdf")>-1){
1004            digitalData.download = {
1005                name: linkname,
1006                pageName: currentPagePath
1007            }
1008            _satellite.track('download');
1009        }
1010        else{
1011
1012            digitalData.link = {
1013                name: linkname,
1014                pageName: currentPagePath
1015            }
1016            _satellite.track('link click');
1017        }
1018    });
1019
1020    $.urlParam = function (name) {
1021        var results = new RegExp('[\?&]' + name + '=([^&#]*)')
1022                          .exec(decodeURI(window.location.search));
1023        return (results !== null) ? results[1] || 0 : false;
1024	}
1025
1026});

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.