Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- It's Clickio Consent Queue script. It should be placed before all of consent, ads, facebook scripts in the <head> -->
- <script type="text/javascript">
- var googletag=googletag||{};
- googletag.cmd=googletag.cmd||[];
- googletag.cmd.unshift(function(){window.googletag.pubads().disableInitialLoad()});
- var adsbygoogle=window.adsbygoogle||[];
- adsbygoogle.pauseAdRequests=1;
- var consentCallbackQueue=function(e,o){var t=!1,n=!1;let a=[],g=!1,l=!1,s=function(){g=!0,a.map(function(e,o){void 0!==e&&(e(t,n),a[o]=void 0)})};return document.documentElement.addEventListener("clickioConsentEvent",function(o){var a;a=o.detail.state,l=!0,null===a?(t=!0,n=!0,s()):-1===a||(0===a?(t=!1,n=!1,s()):1===a&&(t=!!e.__lxG__consent__.getGoogleConsentMode(),n=!!e.__lxG__consent__.getPurposeOneAllowed(),s()))},!1),setTimeout(function(){l||document.documentElement.dispatchEvent(new CustomEvent("clickioConsentEvent",{detail:{state:0}}))},5e3),{push:function(e){g?e(t,n):a.push(e)}}}(window);
- function displayAndRefreshSlotById(e){consentCallbackQueue.push(function(o,t){o&&googletag.cmd.push(function(){googletag.pubads().isInitialLoadDisabled()?googletag.pubads().getSlots().forEach(function(o){o.getSlotElementId()==e&&(googletag.display(e),googletag.pubads().refresh([o]))}):googletag.display(e)})})}
- consentCallbackQueue.push(function(e,o){e&&(adsbygoogle.pauseAdRequests=0)});
- </script>
- <!-- Should be after previous script and after script on screenshot (https://clickio.gyazo.com/8f88d50d6938fedf7e60e802f10c6522), but before any FaceBook scripts, desirable in the <head> element-->
- <script>
- function cl_fb_consent() {
- ! function(f, b, e, v, n, t, s) {
- if(f.fbq)return;n=f.fbq=function(){n.callMethod?
- n.callMethod.apply(n,arguments):n.queue.push(arguments)};
- if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
- n.queue=[];t=b.createElement(e);t.async=!0;
- t.src=v;s=b.getElementsByTagName(e)[0];
- s.parentNode.insertBefore(t,s)}(window, document,'script',
- 'https://connect.facebook.net/en_US/fbevents.js');
- fbq('consent', 'revoke');
- consentCallbackQueue.push(function(e,o){e&&(fbq('consent', 'grant');)});
- }
- window.REBELMOUSE_TASKS_QUEUE.push(cl_fb_consent);
- </script>
Add Comment
Please, Sign In to add comment