• Resolved doppiomalto

    (@doppiomalto)


    Hi
    Your plugin works very well.
    I’ve a a question. I used the Adsense Plugin before Italian Coookie Law introduction but now we cant use cookie without the user’s content.

    I want to use this function in Official Adsense Plugin

    if ( function_exists('cookie_accepted') && cookie_accepted() ) {
        // Your code
    }

    Do you Know where Can I put this code, I need to know the page.
    I know yhat the adsense plugin isn’t yours, but It’s very important for many italian users. I’ve already written on Adsense Plugin Support page.
    Thanks

    https://www.ads-software.com/plugins/eu-cookie-law/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marco Milesi

    (@milmor)

    Hi,
    how do you add AdSense banners in your website? Widget, shortcode, or other?

    Please note that we also provide [cookie] .. [/cookie] shortcodes and an auto-block feature that you can enable (did you try with it?).

    Thread Starter doppiomalto

    (@doppiomalto)

    Hi
    Well, I’m using the officiale Adsense Plugin and AdInserter, but It’s not the problem.
    I’m doing some test and now I’ve seen that I earn more than 70% when eu cookie law is deactivate.
    I’ve seen that the function and short code aren’t the problem.
    Now I think that the problem may be the refresh after the scroll.
    Could help me in some way?
    What could be the problem?
    At the moment I’m trying EU COOKIE LOW activated, with scroll activated and without function.
    Tomorrow I will try EU COOKIE LOW activated without scroll and with function.

    Thread Starter doppiomalto

    (@doppiomalto)

    Ok. Maybe I understand it.
    The refresh after the scroll is too fast and Google AdSense see the navigation as a fraud.
    We need to insert a delay before window.location.reload();

    I tried some codes but they don’t work.
    Could you suggest me something
    I tried

    try {
        Thread.sleep(1000);                 //1000 milliseconds is one second.
    } catch(InterruptedException ex) {
        Thread.currentThread().interrupt();
    }

    Plugin Author Marco Milesi

    (@milmor)

    Hi,
    you should hack /js/scripts.js as follows:

    jQuery(window).scroll(function(){
    		if ( scrollConsent > 0 && document.cookie.indexOf("euCookie") < 0 ) {
    			setTimeout(function () {
    				if (isCookiePage) { return; }
    			euCookieConsent();
    			}, 5000);
    		}
    	});

    or

    jQuery(window).scroll(function(){
    		if ( scrollConsent > 0 && document.cookie.indexOf("euCookie") < 0 && jQuery(window).scrollTop() > 300 ) {
    			if (isCookiePage) { return; }
    			euCookieConsent();
    		}
    	});

    The first snippet applies a 5-seconds retard before page reload.
    The second one reloads the page after a 300px scrolling.

    None of them are really good for final users (except if your site is very fast). In the future we will work to make the plugin working even without scrolling.

    Regards

    PS. I think that you earn less because of people who don’t even scroll your page. If i were you, i would disable scroll consent and activate only “Navigation Consent”

    Thread Starter doppiomalto

    (@doppiomalto)

    Perfetto, grazie

    Plugin Author Marco Milesi

    (@milmor)

    I forgot to specify that these snippets must replace lines 30-35.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Eu Cookie Law and Adsense Plugin’ is closed to new replies.