PageSourceSearch

https://www.teamtailor.com/mcae-form-embed/en-us-bookADemo.js

js teamtailor.com collected 2026-09-24 08:35:10 UTC 9,884 bytes, 93 lines download raw bytes

1(function() {
2  var embedKey = "en-us-bookADemo";
3  var __ttMcaeEmbedState = window.__ttMcaeFormEmbedState || (window.__ttMcaeFormEmbedState = {});
4  const translations = {"email":"Company email","first_name":"First name","last_name":"Last name","jobtitle":"Job title","country":"Location","company":"Company","Amount_of_Employees":"Number of employees","phone":"Phone","dataProcessing":"By submitting this form, you give us permission to contact you by phone and email. For more information, read our <a>Privacy Policy</a>.","dataProcessingNoPhone":"By submitting this form, you give us permission to contact you by email. For more information, read our <a>Privacy Policy</a>.","submit":"Book a demo","required":"Please complete this required field.","businessEmail":"Only business email addresses are allowed.","MISSING_REQUIRED_FIELDS":"Please complete all required fields.","countryOptionLabels":{"1651532":"Afghanistan","1651535":"Albania","1651538":"Algeria","1651541":"Andorra","1651544":"Angola","1651547":"Anguilla","1651550":"Antarctica","1651553":"Antigua and Barbuda","1651556":"Argentina","1651559":"Armenia","1651562":"Aruba","1651565":"Australia","1651568":"Austria","1651571":"Azerbaijan","1651574":"Bahamas","1651577":"Bahrain","1651580":"Bangladesh","1651583":"Barbados","1651586":"Belarus","1651589":"Belgium","1651592":"Belize","1651595":"Benin","1651598":"Bermuda","1651601":"Bhutan","1651604":"Bolivia","1651607":"Bosnia and Herzegovina","1651610":"Botswana","1651613":"Brazil","1651616":"British Indian Ocean Territory","1651619":"Brunei","1651622":"Bulgaria","1651625":"Burkina Faso","1651628":"Burundi","1651631":"Cambodia","1651634":"Cameroon","1651637":"Canada","1651640":"Cape Verde","1651643":"Cayman Islands","1651646":"Central African Republic","1651649":"Chad","1651652":"Chile","1651655":"China","1651658":"Christmas Island","1651661":"Cocos (Keeling) Islands","1651664":"Colombia","1651667":"Comoros","1651670":"Congo","1651673":"Cook Islands","1651676":"Costa Rica","1651679":"Croatia","1651682":"Cuba","1651685":"Curaçao","1651688":"Cyprus","1651691":"Czech Republic","1651694":"Cote d'Ivoire","1651697":"Democratic Republic of the Congo","1651700":"Denmark","1651703":"Djibouti","1651706":"Dominica","1651709":"Dominican Republic","1651712":"Ecuador","1651715":"Egypt","1651718":"El Salvador","1651721":"Equatorial Guinea","1651724":"Eritrea","1651727":"Estonia","1651730":"Ethiopia","1651733":"Falkland Islands","1651736":"Faroe Islands","1651739":"Fiji","1651742":"Finland","1651745":"France","1651748":"French Guiana","1651751":"French Polynesia","1651754":"French Southern and Antarctic Lands","1651757":"Gabon","1651760":"Gambia","1651763":"Georgia","1651766":"Germany","1651769":"Ghana","1651772":"Gibraltar","1651775":"Greece","1651778":"Greenland","1651781":"Grenada","1651784":"Guadeloupe","1651787":"Guam","1651790":"Guatemala","1651793":"Guernsey","1651796":"Guinea","1651799":"Guinea-Bissau","1651802":"Guyana","1651805":"Haiti","1651808":"Honduras","1651811":"Hong Kong","1651814":"Hungary","1651817":"Iceland","1651820":"India","1651823":"Indonesia","1651826":"Iraq","1651829":"Ireland","1651832":"Isle of Man","1651835":"Israel","1651838":"Italy","1651841":"Jamaica","1651844":"Japan","1651847":"Jersey","1651850":"Jordan","1651853":"Kazakhstan","1651856":"Kenya","1651859":"Kiribati","1651862":"Kuwait","1651865":"Kyrgyzstan","1651868":"Laos","1651871":"Latvia","1651874":"Lebanon","1651877":"Lesotho","1651880":"Liberia","1651883":"Libya","1651886":"Liechtenstein","1651889":"Lithuania","1651892":"Luxembourg","1651895":"Macau","1651898":"Macedonia (FYROM)","1651901":"Madagascar","1651904":"Malawi","1651907":"Malaysia","1651910":"Maldives","1651913":"Mali","1651916":"Malta","1651919":"Marshall Islands","1651922":"Martinique","1651925":"Mauritania","1651928":"Mauritius","1651931":"Mayotte","1651934":"Mexico","1651937":"Micronesia","1651940":"Moldova","1651943":"Monaco","1651946":"Mongolia","1651949":"Montenegro","1651952":"Montserrat","1651955":"Morocco","1651958":"Mozambique","1651961":"Myanmar (Burma)","1651964":"Namibia","1651967":"Nauru","1651970":"Nepal","1651973":"Netherlands","1651976":"New Caledonia","1651979":"New Zealand","1651982":"Nicaragua","1651985":"Niger","1651988":"Nigeria","1651991":"Niue","1651994":"Norfolk Island","1651997":"Northern Mariana Islands","1652000":"Norway","1652003":"Oman","1652006":"Pakistan","1652009":"Palau","1652012":"Palestine","1652015":"Panama","1652018":"Papua New Guinea","1652021":"Paraguay","1652024":"Peru","1652027":"Philippines","1652030":"Pitcairn Islands","1652033":"Poland","1652036":"Portugal","1652039":"Puerto Rico","1652042":"Qatar","1652045":"Romania","1652048":"Rwanda","1652051":"Réunion","1652054":"Saint Barthélemy","1652057":"Saint Helena","1652060":"Saint Kitts and Nevis","1652063":"Saint Lucia","1652066":"Saint Martin","1652069":"Sint Maarten","1652072":"Saint Pierre and Miquelon","1652075":"Saint Vincent and the Grenadines","1652078":"Samoa","1652081":"San Marino","1652084":"Sao Tome and Principe","1652087":"Saudi Arabia","1652090":"Senegal","1652093":"Serbia","1652096":"Seychelles","1652099":"Sierra Leone","1652102":"Singapore","1652105":"Slovakia","1652108":"Slovenia","1652111":"Solomon Islands","1652114":"Somalia","1652117":"South Africa","1652120":"South Korea","1652123":"South Sudan","1652126":"Spain","1652129":"Sri Lanka","1652132":"Sudan","1652135":"Suriname","1652138":"Svalbard and Jan Mayen","1652141":"Swaziland","1652144":"Sweden","1652147":"Switzerland","1652150":"Taiwan","1652153":"Tajikistan","1652156":"Tanzania","1652159":"Thailand","1652162":"East Timor","1652165":"Togo","1652168":"Tokelau","1652171":"Tonga","1652174":"Trinidad and Tobago","1652177":"Tunisia","1652180":"Turkey","1652183":"Turkmenistan","1652186":"Turks and Caicos Islands","1652189":"Tuvalu","1652192":"U.S. Virgin Islands","1652195":"Uganda","1652198":"Ukraine","1652201":"United Arab Emirates","1652204":"United States","1652207":"United Kingdom","1652210":"Uruguay","1652213":"Uzbekistan","1652216":"Vanuatu","1652219":"Vatican City","1652222":"Venezuela","1652225":"British Virgin Islands","1652228":"Vietnam","1652231":"Wallis and Futuna","1652234":"Western Sahara","1652237":"Yemen","1652240":"Zambia","1652243":"Zimbabwe"}};
5  const countryPicklistValue = "";
6  const thankYouUrl = "/en-us/thank-you/";
7
8  function shouldSkipMcaeThankYouRedirect() {
9    try {
10      var params = new URLSearchParams(window.location.search);
11      var v = params.get('tt_mcae_no_redirect');
12      if (v === null) {
13        return false;
14      }
15      var normalized = String(v).trim().toLowerCase();
16      if (normalized === '' || normalized === '1' || normalized === 'true' || normalized === 'yes') {
17        return true;
18      }
19      if (normalized === '0' || normalized === 'false' || normalized === 'no') {
20        return false;
21      }
22      return false;
23    } catch (e) {
24      return false;
25    }
26  }
27
28  function onMessage(event) {
29    if (event.origin !== 'https://discover.teamtailor.com') {
30      return;
31    }
32    if (hasJsonStructure(event.data)) {
33      var data = JSON.parse(event.data);
34      if (data.message === "[McaeForm]submitted") {
35        // One-shot guard: MCAE thank-you pages / scripts may post multiple submitted messages.
36        // Also protects against accidental double-inclusion of this embed script.
37        if (__ttMcaeEmbedState[embedKey]) {
38          return;
39        }
40        __ttMcaeEmbedState[embedKey] = true;
41
42        window.removeEventListener('message', onMessage);
43        void (async function () {
44          try {
45            if (window.TeamtailorDataLayer && typeof window.TeamtailorDataLayer.pushLeadEvent === 'function') {
46              await window.TeamtailorDataLayer.pushLeadEvent({
47                email: data.email,
48                phone: data.phone,
49                company: data.company,
50                companyLocation: data.companyLocation,
51                numberOfEmployees: data.amountOfEmployees,
52              }, 'mcae_form');
53            }
54          } catch (e) {
55            // Never block redirect if tracking fails.
56          }
57          if (!shouldSkipMcaeThankYouRedirect()) {
58            try { sessionStorage.setItem('tt_thankyou_conversion', JSON.stringify({ event: embedKey.indexOf('getAQuote') > -1 ? 'ec_form_submit_price_request' : 'ec_form_submit_book_demo', email: data.email || '', amountOfEmployees: data.amountOfEmployees || '' })); } catch (e) {}
59            window.location.href = data.customRedirect || thankYouUrl;
60          }
61        })();
62      }
63    }
64    if (event.data === '[McaeForm]loaded') {
65      var codeIsland = document.querySelector('[data-loader*="McaeForm"]');
66      var iframe = codeIsland && codeIsland.shadowRoot && codeIsland.shadowRoot.querySelector('iframe');
67      if (iframe && iframe.iFrameResizer) {
68        iframe.iFrameResizer.sendMessage(JSON.stringify({
69          message: "[McaeForm]translations",
70          translations: translations,
71          countryPicklistValue: countryPicklistValue || undefined,
72          enableAutocomplete: false,
73          enableCountryPrefill: false,
74        }), 'https://discover.teamtailor.com');
75      }
76    }
77  }
78
79  function hasJsonStructure(str) {
80  if (typeof str !== 'string') return false;
81  try {
82    var result = JSON.parse(str);
83    var type = Object.prototype.toString.call(result);
84    return type === '[object Object]' || type === '[object Array]';
85  } catch (err) {
86    return false;
87  }
88}
89
90  window.addEventListener('message', onMessage);
91})();
92!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d84cf666-de51-52cc-a3d3-c2d64b5511fc")}catch(e){}}();
93//# debugId=d84cf666-de51-52cc-a3d3-c2d64b5511fc

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.