Forum Replies Created

Viewing 15 replies - 1 through 15 (of 62 total)
  • Thread Starter jd1234

    (@jd1234)

    okay I have sorted this out.

    thanks

    Thread Starter jd1234

    (@jd1234)

    We developed a custom theme.

    Thanks for your help, I will forward the guide to the developers.

    Thread Starter jd1234

    (@jd1234)

    oh okay, that makes sense now.

    Our plugin was automatically updated to 2.4.7. We tried to restore it from backup but it updates immediately after the backup is restored.

    We had made custom changes in the plugin. But after initial debugging I can see most of them are there. We are able to make it functional again.

    Thanks for getting back asap on this. This was very worrying for good 3 hours.

    Thread Starter jd1234

    (@jd1234)

    Hi Fernando,

    Hope you are doing well.

    Any update regarding the plugin update?

    Thread Starter jd1234

    (@jd1234)

    Does this code also works for:

    -ContactPage
    -AboutPage

    The description of my contactpage and aboutpage is wrong.

    add_filter( 'schema_output', 'schema_wp_override_description_yoast_seo_12345' );
    /*
    *	Override Schema description value with Yoast SEO description
    */
    function schema_wp_override_description_yoast_seo_12345( $schema_output ) {
    	
    	// get description value from Yoast SEO post meta
    	$desc = get_post_meta( get_the_ID(), '_yoast_wpseo_metadesc', true);
    	
    	// override the value in schema output
    	$schema_output["description"] = $desc;
    	
    	// return our schema array
    	return $schema_output;
    }

    I think I have the same problem. Did you get it to fix it?

    This happens for pages not posts

    Thread Starter jd1234

    (@jd1234)

    Is there a code that I can use to over-write the schema output?

    Just the description in About and contact page is wrong.

    Thread Starter jd1234

    (@jd1234)

    yeah I can understand.

    Good luck. I am looking forward to the plugin update.

    Thanks a lot for your efforts.

    Thread Starter jd1234

    (@jd1234)

    Any update on JS checking the cookies?

    Thread Starter jd1234

    (@jd1234)

    One last question. When can we expect JS checking the cookies and doing the imports? Is it close or far?

    Thread Starter jd1234

    (@jd1234)

    As we are on the subject of caching.

    Does this plugin have any issues with cloudflare?

    • This reply was modified 7 years, 9 months ago by jd1234.
    Thread Starter jd1234

    (@jd1234)

    That would be awesome, if you can get it to work with JS. Thanks Fernando.

    There was one small mistake I think.

    I had ‘$consent_id’ as ‘behaviour_analytics’, I think that was the mistake, it was suppose to me ‘behaviour-analytics’. I just checked the id. But still it doesn’t seem to work.

    I was able to sort the caching issue out for google analytics, which should have resolved hotjar issue too.

    I am using ‘has_consent( $consent_id )’, I think I will try it with is_allowed_cookie( $cookie ). Can I use is_allowed_cookie( $cookie ) here? Hotjar is unchecked to start with.

    Thread Starter jd1234

    (@jd1234)

    okay so this works for google analytics.

    add_action( 'wp_head', 'google_opt_check');
      function google_opt_check(){
       if ( is_allowed_cookie( '_ga' ) ) {
        ?>
      <script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-XXXXXXXX-X', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
    </script>
    <script async src='https://www.google-analytics.com/analytics.js'></script>
    <?php }
    	else{
    ?>
    	<script>
    		window['ga-disable-UA-XXXXXXX-X'] = true;
    	</script>
    <?php
    }
    }

    The only problem is it is interfering with the cache, I have to clean the cache for the button to work. But this is not a plugin issue so all good there. Will try to find a work around.

    But the hotjar cookie is not working.

    /*code for hotjat with cookie consent*/
    add_action('wp_head', 'hotjar_opt_check');
    function hotjar_opt_check(){
    if ( has_consent( 'behaviour_analytics' ) ) {
    ?>
    <script>
        (function(h,o,t,j,a,r){
            h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
            h._hjSettings={hjid:XXXXX,hjsv:X};
            a=o.getElementsByTagName('head')[0];
            r=o.createElement('script');r.async=1;
            r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
            a.appendChild(r);
        })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
    </script>
    <?php }
    }

    Can you see whats wrong here?

    • This reply was modified 7 years, 9 months ago by jd1234.
    Thread Starter jd1234

    (@jd1234)

    I am checking the google analytics twice as I have set google analytics ‘on’ by default. So it checks if it is ‘allowed cookie’ and if the consent is given. Then it deploys.

    For hotjar what I am trying to say that check for consent and if you have consent then set the cookies?

    Also it seems as though this code is not working.

    Can you help me edit the code?

    Thread Starter jd1234

    (@jd1234)

    Is nobody there?

    Will really appreciate if somebody can point me in the right direction.

Viewing 15 replies - 1 through 15 (of 62 total)