How to deploy Meiro Events with The TradeDesk on the website
The TradeDesk is a platform for programmatic buying ads. It is possible to set customer audiences within Trade Desk.
The whole process called Cookie Syncing will allow enriching meiro_user_id with The TradeDesk user id that can be used further within Meiro for targeting.
To learn more about Cookie Syncing please refer to this article.
To deploy Meiro Events with The TradeDesk on the website, please insert code within the page. Following script needs to be included in the website’s head (after <title>
HTML tag).
This script needs to be placed on EVERY page on your website, it needs to always be present on the web.
<script type="text/javascript">
var config = {
domain: "{{COLLECTOR_DOMAIN}}",
the_trade_desk: {
pid: "stringPartner pid,ID required",from puid: "string puid, optional"TheTradeDesk",
gdpr: 1/0 number,number optional,(optional),
gdpr_consent: "base64url-encoded GDPR consent string, meaningful when 'gdpr' is set to 1"1 (optional)"
}
}
var script = document.createElement("script");
var callback = function() {
MeiroEvents.track("outboundLinkClick");
};
script.onload = function() {
MeiroEvents.init(config);
MeiroEvents.track("pageView");
if (document.readyState === "complete") {
callback();
} else {
window.addEventListener("load", callback);
}
};
script.src = "//sdk." + domain;
script.async = true;
document.head.appendChild(script);
</script>