Adcontroller: Difference between revisions
Created page with "==Implementation AdController framework== ===Overview=== The AdController provides a script deployment framework for the initialization and rendering of an ad request for of..." |
No edit summary |
||
| (11 intermediate revisions by 3 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 206: | Line 247: | ||
<div class="page-break"></div> | <div class="page-break"></div> | ||
==Ad | ==Ad placeholder container model== | ||
The positioning of the placeholder containers for the ad placements in the publisher site follows the pre-agreed placement/tagging plan. The integration of the container itself should be according to the following sample. | |||
= | <syntaxhighlight lang='html'> | ||
=== | <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> | |||
For the right identification of all placeholders every placeholder div-container must containt the following Information. | |||
# The class "'''iqdcontainer'''". This class is a marker for all placeholder div-container. | |||
# The data attribute "'''data-placement'''". Due to this data-attribute every position in the site can be addressed unambiguously. | |||
# Das Data Attribute "'''data-device'''". This data attribute identifies if a placeholder div container is intended for desktop, mobile or tablet advertisement. possible values: '''desktop | tablet | mobile''' | |||
===Special Positions=== | |||
==== | ====Header and Footer==== | ||
All positions in footer and header do not receive a number in "data-placement", instead they are unambiguously determined by the values "pos_header" and "pos_footer". | |||
<syntaxhighlight lang='html'> | <syntaxhighlight lang='html'> | ||
<div | <div class="iqdcontainer" data-placement="pos_header" 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 277: | 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: | ||