Candidate Profiles
{ if(clickedElement.prop(“tagName”) === “INPUT”) { return clickedElement.attr(“value”); } if(clickedElement.attr(‘id’) === “mobileAppDownloadBanner” || clickedElement.hasClass(‘mobile-app-download-link’)) { return clickedElement.find(‘h2’).text(); } return clickedElement.text(); } // special cases requiring additional data const specialCases = { “content_button_click”: “cta_button_text”, “promo_banner_button_click”: “promo_banner_button_text”, “content_link_click”: “cta_link_text”, “rhd_jo_radio_button_position_1”: “rhd_jo_radio_button_title_text”, “rhd_jo_radio_button_position_2”: “rhd_jo_radio_button_title_text”, “domino_expanded_card_cta_click”: “domino_expanded_cta_title”, “hero_banner_button_click”: “hero_banner_button_text”, “hero_banner_link_click”: “hero_banner_link_text”, “interactive_email_content_click”: “content_text” } if(specialCases[tracking.event]) { trackingData[specialCases[tracking.event]] = clickableText(); } if(tracking.event === “interactive_email_content_click”) { let pagePath = document.location.pathname.split(‘/’); let page = pagePath[pagePath.length-1].replace(‘-‘, ‘ ‘); trackingData[“interactive_email_page_type”] = `${page} page`; } else if(tracking.event === “GetStartedEventTracker”) { trackingData = { ‘tealium_event’: ‘GetStartedEventTracker’, ‘event_category’: ‘RH Direct’, ‘event_action’: ‘Submit Form’, ‘event_label’: ‘Get Started – Valid Submit’, ‘form_email’: jQuery(‘#emailAddress’).val(), ‘user_type’: ‘Client’, ‘nonInteraction’: 0 } } console.log(‘TRACKING DATA:’, trackingData); tracking.send(trackingData); } jQuery(‘body’).on(‘click’, ‘[tracking]’, function () { trackingFunction(this); }); jQuery(‘.app-store’).click(function() { trackingFunction(this); }); let userAgent = navigator.userAgent || navigator.vendor || window.opera; // Android detection if (/android/i.test(userAgent)) { return; } // iOS detection else if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return; } else { jQuery(‘.mobile-app-download-link a’).click(function() { trackingFunction(this); }); } }); //–> ]]>
software-engineer let position = jobPosition.toLowerCase().split(‘ ‘).join(‘-‘); // return anchor link hrefs using the job position acquired from the anchor text content and the location from the url path return `${currentLanguage}/jobs/${position}/${newLocation}`; } // End of setting job anchor link // Start of looping through each job anchor link to set href jQuery(‘a.position-link’).each((_, positionLink) => { let position = positionLink.textContent; // set target attribute so link opens in new tab positionLink.setAttribute(‘target’, ‘_blank’); // set href for anchor positionLink.href = setJobAnchorHrefs(position); console.log(setJobAnchorHrefs(position)) }) // End of looping through each job anchor link to set href }); //–> ]]>
