(function () {
console.log('in find forms');
function xrx_log_form_presentation(formType) {
var senddata = {
"application": "formPresentation",
"locale": digitalData.locale.locale,
"href": location.protocol+'//'+location.host+location.pathname,
"fullHref": location.href,
"referrer": document.referrer,
"tier": digitalData.locale.tier,
"formType": formType
};
if (formType == "LAMP formeng form") {
console.log("formeng");
console.log(_satellite.getVar('form'));
senddata.formId = _satellite.getVar('form');
}
var done = false;
// look for marketo meta data
var formMeta = document.querySelector("form[data-embedded-marketo-form]");
if (formMeta !== null) {
var raw_data = formMeta.getAttribute("data-embedded-marketo-form");
if (raw_data != "") {
try {
var data = JSON.parse(raw_data);
if (data.hasOwnProperty("instanceId")) {
senddata.marketoInstanceId = data.instanceId;
}
if (data.hasOwnProperty("formNumber")) {
senddata.marketoFormNumber = data.formNumber;
done = true;
}
//console.log(data);
} catch(e) {}
}
}
// try LAMP style meta
var formMeta = document.querySelector("div[data-xrx_tag_marketo_form]");
if (formMeta !== null && !done) {
console.log("found lamp metadata");
var raw_data = formMeta.getAttribute("data-xrx_tag_marketo_form");
if (raw_data != "") {
try {
var data = JSON.parse(raw_data);
if (data.hasOwnProperty("instance")) {
senddata.marketoInstanceId = data.instance;
}
if (data.hasOwnProperty("formid")) {
senddata.marketoFormNumber = data.formid;
done = true;
}
} catch(e) {}
}
}
if (!done) {
// try hidden fields
var formidInput = document.querySelector('input[name="formid"].mktoField');
if (formidInput !== null) {
senddata.marketoFormNumber = formidInput.getAttribute('value');
done = true;
}
var munchkinInput = document.querySelector('input[name="munchkinId"].mktoField');
if (munchkinInput !== null) {
senddata.marketoInstanceId = munchkinInput.getAttribute('value');
}
}
if (!done) {
// try form data attributes
var mktoForm = document.querySelector("form.mktoForm");
if (mktoForm !== null) {
var formNumber = mktoForm.getAttribute("data-form-id");
if (formNumber != "") {
senddata.marketoFormNumber = formNumber;
done = true;
}
var formId = mktoForm.getAttribute("data-instance");
if (formId != "") {
senddata.marketoInstanceId = formId;
}
}
}
var logglypixel = document.createElement('img');
logglypixel.src = "https://logs-01.loggly.com/inputs/7cabc394-8e60-4bf9-8d74-f98ec1a89df9/tag/widgetLog/1*1.gif?PLAINTEXT="+escape(JSON.stringify(senddata));
}
var xrx_locale_short = 'enus';
var xrx_translation_language = 'en-us';
var xrx_base_url = 'https://www.xerox.com';
if (typeof xrx_vars !== 'undefined') {
xrx_locale_short = xrx_vars['locale-short'];
xrx_translation_language = (xrx_vars['content-cascade'].split(','))[3];
xrx_base_url = xrx_vars['base-url'];
}
//console.log(xrx_locale_short+" "+xrx_translation_language+" "+xrx_base_url);
var preference_link = xrx_preference_link(xrx_base_url,xrx_locale_short,xrx_translation_language);
var privacy_link = xrx_privacy_link(xrx_base_url,xrx_locale_short,xrx_translation_language);
if (document.getElementsByClassName("xrx-fw-marketo-form").length > 0) {
/* Look for framework style of form */
console.log('framework marketo form found');
xrx_log_form_presentation('Framework marketo form');
var gdprNode = document.createElement("DIV");
gdprNode.innerHTML = ''+preference_link+''+privacy_link+'';
//gdprNode.style.fontWeight = 400;
if (document.querySelector(".xrx-fw-marketo-form__footer") !== null) {
document.getElementsByClassName("xrx-fw-marketo-form__footer")[0].appendChild(gdprNode);
}
} else if (document.getElementsByClassName("node-component-embedded-marketo-form").length > 0) {
/* Look for Drupal-style embedded Marketo forms */
xrx_log_form_presentation('Drupal embedded Marketo form');
var gdprNode = document.createElement("DIV");
/* figure out text color */
textColor = window.getComputedStyle(document.getElementsByClassName("group-marketo-embedded-wrapper field-group-div")[0], null).getPropertyValue("color");
//console.log("Font color: "+textColor);
backgroundColor = "#FFF";
if (textColor == "rgb(255, 255, 255)") {
backgroundColor = "#333";
}
gdprNode.setAttribute("class","field-form-header-copy");
gdprNode.style.fontWeight = 400;
gdprNode.style.background = backgroundColor;
gdprNode.innerHTML = '
'+preference_link+'
'+privacy_link+'
';
document.getElementsByClassName("group-marketo-embedded-wrapper field-group-div")[0].appendChild(gdprNode);
} else if (document.getElementsByClassName("node-marketo-form").length > 0) {
/* Look for other Drupal forms */
xrx_log_form_presentation('Other Drupal form');
var gdprNode = document.createElement("DIV");
gdprNode.style.marginTop="20px";
gdprNode.innerHTML = ''+preference_link+'
'+privacy_link+'
';
var form_actions = document.getElementsByClassName("form-actions");
if (form_actions.length > 0) {
form_actions[0].appendChild(gdprNode);
}
} else if (document.getElementsByClassName("xrx_formeng_privacy_additions_here").length > 0) {
/* LAMP formeng form */
xrx_log_form_presentation('LAMP formeng form');
var gdprNode = document.createElement("DIV");
gdprNode.innerHTML = ''+preference_link+'
'+privacy_link+'
';
document.getElementsByClassName("xrx_formeng_privacy_additions_here")[0].appendChild(gdprNode);
} else if (document.getElementsByClassName("xrx_mkto_privacy_additions_here").length > 0) {
/* LAMP Marketo form */
xrx_log_form_presentation('LAMP Marketo form');
var gdprNode = document.createElement("DIV");
gdprNode.style.marginTop="20px";
gdprNode.innerHTML = ''+preference_link+'
'+privacy_link+'
';
document.getElementsByClassName("xrx_mkto_privacy_additions_here")[0].appendChild(gdprNode);
}
function xrx_preference_link(xrx_base_url,xrx_locale_short,xrx_translation_language) {
//return "";
var translations = {
"bg" : "За да промените предпочитанията си за комуникация, моля, посетете нашия Център за предпочитания.",
"cs" : "Chcete-li změnit zasílané informace či formu komunikace, navštivte naše Centrum preferencí.",
"da" : "Besøg vores Præferebcecenter for at ændre dine kommunikationspræferencer.",
"de" : "Ihre Kommunikationseinstellungen können Sie in den Kontakteinstellungen ändern.",
"el" : "Για να αλλάξετε τις προτιμήσεις επικοινωνίας σας, επισκεφτείτε το Κέντρο προτιμήσεών μας.",
"es-ar" : "Para cambiar sus preferencias de comunicación, visite nuestro Centro de Preferencias.",
"es" : "Para cambiar sus preferencias de comunicación, visite nuestro Centro de preferencias.",
"et" : "Oma suhtluseelistuste muutmiseks külastage meie Eelistuskeskust.",
"fi" : "Jos haluat muuttaa viestintäasetuksiasi, käy asetuskeskuksessamme.",
"fr-ca" : "Pour modifier vos préférences de communication, veuillez visiter notre Centre de préférences.",
"fr" : "Pour modifier vos préférences de communication, veuillez vous rendre dans notre Centre de préférences.",
"he" : "לשינוי העדפות העדכונים יש להיכנס אל מרכז ההעדפות.",
"hu" : "A kommunikációs beállítások módosításához nyissa meg a beállítási központot.",
"it" : "Per modificare le tue preferenze per le comunicazioni, visita il nostro Centro Preferenze.",
"lt" : "Norėdami pakeisti ryšio palaikymo parinktis, apsilankykite mūsų parinkčių centre.",
"lv" : "Lai mainītu saziņas preferences, apmeklējiet mūsu Preferenču centru.",
"mk" : "За да ги смените преференциите за комуникација, ве молиме, посетете го нашиот Центар за преференции.",
"nl" : "Ga naar ons Voorkeurencentrum om uw communicatievoorkeuren te wijzigen.",
"no" : "Gå til Preference Center for å endre kommunikasjonspreferansene.",
"pl" : "Aby zmienić preferencje komunikacyjne, prosimy przejść do naszego Centrum preferencji.",
"pt-br" : "Para alterar suas preferências de comunicação, visite nosso Preference Center (Centro de Preferências).",
"pt-pt" : "Para alterar as suas preferências de comunicação, visite o nosso Centro de Preferências.",
"ro" : "Pentru a vă schimba preferințele de comunicare, vă rugăm vizitați-ne Centrul de preferințe.",
"sq" : "Për të ndryshuar preferencat e komunikimit me ne, ju lutemi vizitoni Qendrën e Preferencave.",
"sr" : "Da biste izmenili svoja podešavanja za komunikaciju, posetite naš Centar za podešavanja.",
"sv" : "Om du vill ändra dina kommunikationsinställningar kan du gå till vårt Inställningscenter.",
"tr" : "İletişim tercihlerinizi değiştirmek için Tercih Merkezini ziyaret edebilirsiniz."
};
var english = 'To change your communication preferences, please visit our Preference Center';
var link = translations[xrx_translation_language];
if (typeof link === "undefined") {
link = english;
}
var urls = {
"en-us" : "https://preferences.business.xerox.com/ENUS",
//"bg" : "https://preferences.business.xerox.com/BG",
"cs" : "https://preferences.business.xerox.com/CZ",
"da" : "https://preferences.business.xerox.com/DA",
"de" : "https://preferences.business.xerox.com/DE",
"el" : "https://preferences.business.xerox.com/EL",
"en-gb" : "https://preferences.business.xerox.com",
"es" : "https://preferences.business.xerox.com/ES",
"es-ar" : "https://preferences.business.xerox.com/ESAR",
"fi" : "https://preferences.business.xerox.com/FI",
"fr" : "https://preferences.business.xerox.com/FR",
"fr-ca" : "https://preferences.business.xerox.com/FRCA",
"he" : "https://preferences.business.xerox.com/HE",
"hu" : "https://preferences.business.xerox.com/HU",
"it" : "https://preferences.business.xerox.com/IT",
"nl" : "https://preferences.business.xerox.com/NL",
"no" : "https://preferences.business.xerox.com/NO",
"pl" : "https://preferences.business.xerox.com/PL",
"pt-br" : "https://preferences.business.xerox.com/PTBR",
"pt-pt" : "https://preferences.business.xerox.com/PTPT",
"ro" : "https://preferences.business.xerox.com/RO",
"sv" : "https://preferences.business.xerox.com/SV",
"tr" : "https://preferences.business.xerox.com/TR"
};
var default_url = "https://preferences.business.xerox.com";
var url = urls[xrx_translation_language];
if (typeof url === "undefined") {
url = default_url;
}
var link_attributes = 'target="_blank" name="&lid=preference-ctr" href="'+url+'"';
link = link.replace('href="\#"',link_attributes);
return link;
}
function xrx_privacy_link(xrx_base_url,xrx_locale_short,xrx_translation_language) {
var translations = {
"bg" : "За да видите как защитаваме вашите лични данни, разгледайте нашата Политика за поверителност.",
"cs" : "Chcete-li se podívat, jak chráníme vaše osobní údaje, prostudujte si naše zásady ochrany osobních údajů.",
"da" : "Gå ind på vores Politik om beskyttelse af personlige oplysninger for at se, hvordan vi beskytter dine personlige oplysninger.",
"de" : "Wenn Sie wissen möchten, wie wir Ihre persönlichen Daten schützen, lesen Sie bitte unsere Datenschutzrichtlinien.",
"el" : "Για να δείτε πώς προστατεύουμε τα προσωπικά δεδομένα σας, διαβάστε την Πολιτική απορρήτου μας.",
"es-ar" : "Para ver cómo protegemos sus datos personales, consulte nuestra Política de Privacidad.",
"es" : "Para ver cómo protegemos sus datos personales, consulte nuestra Política de privacidad.",
"et" : "Et näha, kuidas me teie isikuandmeid kaitseme, vaadake meie privaatsuspoliitikat.",
"fi" : "Lue yksityisyydensuojakäytännöstämme, miten suojaamme henkilötietojasi.",
"fr-ca" : "Pour savoir comment nous protégeons vos données personnelles, consultez notre Politique de confidentialité.",
"fr" : "Pour en savoir plus sur notre politique en matière de protection des données, lisez notre Charte de confidentialité.",
"he" : "כדי ללמוד איך אנחנו מגנים על המידע האישי שלך, קרא את מדיניות הפרטיות שלנו.",
"hu" : "Az Adatvédelmi irányelvekből megismerheti, hogyan óvjuk meg a személyes adatait.",
"it" : "Per informazioni su come proteggiamo i tuoi dati personali, consulta la nostra Informativa sulla privacy.",
"lt" : "Norėdami sužinoti, kaip saugome jūsų asmens duomenis, peržiūrėkite mūsų Privatumo politiką.",
"lv" : "Lai uzzinātu, kā mēs varam aizsargāt jūsu personas datus, apskatiet mūsu Privātuma politiku.",
"mk" : "За да видите како ги штитиме вашите лични податоци, погледнете ја нашата Политика за приватност.",
"nl" : "Bekijk ons Privacybeleid om te zien hoe wij uw persoonlijke gegevens beschermen.",
"no" : "Se Privacy Policy for å se hvordan vi beskytter de personlige opplysningene dine.",
"pl" : "Aby zobaczyć, jak chronimy Twoje dane osobowe, zachęcamy do lektury naszych Zasad ochrony prywatności.",
"pt-br" : "Para ver como protegemos seus dados pessoais, leia nossa Política de Privacidade.",
"pt-pt" : "Para saber como protegemos os seus dados pessoais, leia a nossa Política de Privacidade.",
"ro" : "Pentru a vedea cum vă protejăm datele cu caracter personal, consultați-ne Politica de confidențialitate.",
"sq" : "Për të parë se si ne i mbrojmë të dhënat tuaja personale, shikoni Politikën tonë të Privatësisë.",
"sr" : "Da biste videli kako štitimo vaše lične podatke, pogledajte našu Politiku privatnosti.",
"sv" : "Om du vill se hur vi skyddar dina personuppgifter kan du läsa vår sekretesspolicy.",
"tr" : "Kişisel verilerinizi nasıl koruduğumuzu görmek için Gizlilik Politikasına bakabilirsiniz."
};
var english = 'To see how we protect your personal data, view our Privacy Policy.';
var link = translations[xrx_translation_language];
if (typeof link === "undefined") {
link = english;
}
var link_attributes = 'target="_blank" name="&lid=priv-policy" href="'+xrx_base_url+'/about-xerox/privacy-policy/'+xrx_locale_short+'.html"';
link = link.replace('href="\#"',link_attributes);
return link;
}
})();