Adcontroller: Difference between revisions

No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 42: Line 42:


     var iqd_mode = (function () {
     var iqd_mode = (function () {
        var dm = window.location.href.toLowerCase();
      let mode = 'live';
        return (dm.indexOf('iqdeployment=') > 1) ? dm.split('iqdeployment=')[1].split('&')[0] : 'live';
      const currentUrlSearchParams = new URLSearchParams(window.location.search);
 
      if (currentUrlSearchParams.has('iqdeployment')) {
        mode = currentUrlSearchParams.get('iqdeployment').replace(/\W/g, '');
      }
 
      return mode;
     })();
     })();


Line 92: Line 98:


<div class="page-break"></div>
<div class="page-break"></div>
==Client's CMS object (page information used for configurating the AdController)==
==Client's CMS object (page information used for configurating the AdController)==


Line 112: Line 119:
         keywords: "[Takes place after consultation with iq]",
         keywords: "[Takes place after consultation with iq]",
         tma: "[Takes place after consultation with iq]",
         tma: "[Takes place after consultation with iq]",
         platform: "[desktop | tablet | mobile]"
         platform: "[desktop | tablet | mobile]",
        userData: {
          hashedEmail: "[Hashed Email see explanation below]"
        }
     };
     };
</script>
</script>
Line 143: Line 153:


Possible values here are: desktop, tablet, mobile. Please fill in the appropriate value depending on which page layout is active.
Possible values here are: desktop, tablet, mobile. Please fill in the appropriate value depending on which page layout is active.
====key: userData====
“userData” is the collection object for all necessary user information, both in the context of clean room cases and our ID solutions.
=====key: userData:hashedEmail=====
Prior normalization and transfer of via SHA256 created hashes of email addresses after user login/newsletter registration.
<syntaxhighlight lang='javascript'>
//example of sha256 hash
const userData:{
        hashedEmail: "21bd991f8b25a57075dd2489b4eebda1a5d956bbf52f961fe5289c6d5a0a2b5c"
}
</syntaxhighlight>
'''Normalization''':
Before hashing the email address, normalize the character string by removing “superfluous” characters:
# Remove leading and trailing spaces.
# Convert all ASCII characters to lowercase.
# Remove "." (ASCII code 46) from the username of the email address.
  e.g., jane.smith@gmail.com is normalized to janesmith@gmail.com
# Remove "+" (ASCII code 43) and all subsequent characters from the username of the email address 
  à  e.g., janesmith+test@gmail.com is normalized to janesmith@gmail.com


===Character limitation===
===Character limitation===
Line 170: Line 209:
                 if (AdController.getRenderController().isReady()) {
                 if (AdController.getRenderController().isReady()) {
                     AdController.reinitialize(cmsObject);
                     AdController.reinitialize(cmsObject);
                } else {
                    throw new Error("renderController not ready");
                 }
                 }
             } catch (e) {
             } catch (e) {
Line 212: Line 253:
<syntaxhighlight lang='html'>
<syntaxhighlight lang='html'>


<div class="iqdcontainer" data-placement="pos_[N U M M E R]" data-device="[D E V I C E T Y P E]"></div>
<div class="iqdcontainer" data-placement="pos_[N U M B E R]" data-device="[D E V I C E T Y P E]"></div>


</syntaxhighlight>
</syntaxhighlight>