• Resolved Andreas

    (@andioh)


    Hi!
    First thank you for the great plugin!
    I created a privacy policy via iubenda, and insert the JS code into my privacy policy page.
    However when the user is asked to Agree to the new policy, the user gets shown the JS code, not the original policy.
    I added a link where you can check it out.
    Is possible to allow JS in the agree modal when a policy has been updated?

    https://andreas-reitberger.de/wp-content/uploads/2018/04/iubenda.png

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Fernando Claussen

    (@fclaussen)

    Hi @andioh,
    Thank you.

    Well. Inserting javascript code directly into a WordPress page like this is a bad practice.

    The idea is that you paste your content there, not a JS code. The plugin keeps track of policy updates to display this screen to your users to re-consent. It’s impossible to do that if you use a JS function to load your content.

    Anyway,
    Did you wrap your js in <script></script> tags? From what I’ve read, that should make it work.

    Thread Starter Andreas

    (@andioh)

    Hi,
    yes it’s wrapped in the script tags. However it’s not working.
    Iubenda is providing the script code, so the policy is always up to date.

    Any other ideas to try?

    Thanks!

    Plugin Author Fernando Claussen

    (@fclaussen)

    The policy can be up to date, but you can’t update the policy and not notify your users and get new consent from them.

    If you fill the content instead of using the script, whenever you make a change the plugin will prompt you to ask your users for consent. I don’t do it automatically because you might have just fixed a typo.

    With this script that will be impossible.

    Allowing scripts like this is not safe.
    Unless this turns into a popular request, I don’t think I’ll implement this.

    I’m sorry :/

    Thread Starter Andreas

    (@andioh)

    Hi,
    Thanks for your reply.
    The problem is, iubenda only allows to integrate their Privacy Policy via the script.
    So I have no chance to just copy the plain text into it.
    No chance that you change your mind? I get informed by iubenda when there are changes to the policy, so I manually can ask for new consent.

    Thank you!

    Plugin Author Fernando Claussen

    (@fclaussen)

    Hi @andioh,

    Download 1.3.1 and try again.
    If that doesn’t work, try removing the script from the page and adding the following to your functions.php. Let me know if that works.

    add_filter( 'the_content', 'my_content_addition' );
    function my_content_addition( $content ) {
    	$privacy_policy_page = get_option( 'gdpr_privacy_policy_page', 0 );
    	if ( ! $privacy_policy_page || ! is_page( $privacy_policy_page ) ) {
    		return $content;
    	}
    
    	$before = '<script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src = "//cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script>';
    	return $before . $content;
    }

    Just make sure you have the correct script. I’m not sure if I have.

    Thread Starter Andreas

    (@andioh)

    Works perfekt now, thank you!

    Plugin Author Fernando Claussen

    (@fclaussen)

    Glad I could help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with Iubenda privacy policy’ is closed to new replies.