Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function (a, d, o, r, i, c, u, p, w, m) {
- m = d.getElementsByTagName(o)[0], a[c] = a[c]
- || {}, a[c].trigger = a[c].trigger || function () {
- (a[c].trigger.arg = a[c].trigger.arg || []).push(arguments)},
- a[c].on = a[c].on || function () {(a[c].on.arg = a[c].on.arg || []).push(arguments)},
- a[c].off = a[c].off || function () {(a[c].off.arg = a[c].off.arg || []).push(arguments)
- }, w = d.createElement(o), w.id = i, w.src = r, w.async = 1, w.setAttribute(p, u),
- m.parentNode.insertBefore(w, m), w = null}
- )(window, document, "script", "https://20787126.adoric-om.com/adoric.js", "Adoric_Script", "adoric","717f6b771a368c0db0b6de40944408ed", "data-key");
- </script>
- <script>
- (function() {
- function getCookie(cname) {
- var name = cname + "=";
- var decodedCookie = decodeURIComponent(document.cookie);
- var ca = decodedCookie.split(';');
- for (var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1);
- }
- if (c.indexOf(name) == 0) {
- return c.substring(name.length, c.length);
- }
- }
- return "";
- }
- function triggerCampaignWithDellay() {
- var isAgeGateAcepted = getCookie('iqos-age-verified');
- if (!isAgeGateAcepted) {
- return null;
- }
- var DELLAY_TIME = 30 * 1000; /*30 seconds*/
- setTimeout(function() {
- if (adoric && adoric.trigger) {
- adoric.trigger('showClickToCallForm');
- }
- }, DELLAY_TIME);
- }
- function checkPageCondition() {
- var isAgeGateButtonExist = document.querySelector('#age-gate-check');
- if (isAgeGateButtonExist) {
- isAgeGateButtonExist.addEventListener('click', function() {
- setTimeout(triggerCampaignWithDellay, 400);
- });
- } else {
- triggerCampaignWithDellay();
- }
- }
- if (document.readyState === 'loading') {
- document.addEventListener('DOMContentLoaded', checkPageCondition);
- } else {
- checkPageCondition();
- }
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement