Adcontroller: Difference between revisions
No edit summary |
|||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 42: | Line 42: | ||
var iqd_mode = (function () { | var iqd_mode = (function () { | ||
let mode = '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 | <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> | ||
| Line 233: | Line 274: | ||
<div class="iqdcontainer" data-placement="pos_footer" data-device="[D E V I C E T Y P E]"></div> | <div class="iqdcontainer" data-placement="pos_footer" data-device="[D E V I C E T Y P E]"></div> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==Ad placement signal functions== | ||
===AdController.finalize(..)=== | |||
With the AdController.finalize call, the web page signals the AdController that the rendering phase can be completed because no further ad requests from the page are implemented. In some cases, the planned AdController configuration for the current page may differ from the actual implemented ad placements. In this case, the AdController evaluates the deviations, intercepts them and logs them if necessary. Deviations can always occur if no specific $handle assignment has been planned for the offer in question. This can also be a scenario desired by iq digital. | With the AdController.finalize call, the web page signals the AdController that the rendering phase can be completed because no further ad requests from the page are implemented. In some cases, the planned AdController configuration for the current page may differ from the actual implemented ad placements. In this case, the AdController evaluates the deviations, intercepts them and logs them if necessary. Deviations can always occur if no specific $handle assignment has been planned for the offer in question. This can also be a scenario desired by iq digital. | ||
| Line 308: | Line 291: | ||
<div class="page-break"></div> | <div class="page-break"></div> | ||
===IQDComplete() - Pageload signal=== | |||
As soon as all content on the page (including delayed dynamically loaded content) that contributes to the height calculation of the page has been loaded, a signal should be sent to iq digital: | As soon as all content on the page (including delayed dynamically loaded content) that contributes to the height calculation of the page has been loaded, a signal should be sent to iq digital: | ||