Title: javascript:Cookiebot.renew() removed from WordPress posts
Last modified: December 12, 2018

---

# javascript:Cookiebot.renew() removed from WordPress posts

 *  Resolved [PanosK20](https://wordpress.org/support/users/panosk20/)
 * (@panosk20)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/)
 * Hi there,
 * I have followed the instructions for Iframe cookie consent with YouTube:
    [https://support.cookiebot.com/hc/en-us/articles/360003790854-Iframe-cookie-consent-with-YouTube-example](https://support.cookiebot.com/hc/en-us/articles/360003790854-Iframe-cookie-consent-with-YouTube-example)
 * The problem is that WordPress removes the javascript for the cookiebot pop-up
   when switched from “Text” editor, to the “Visual” editor.
 * 
 * If you could please let me know how to fix this
 * Many thanks
    Panos
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascriptcookiebot-renew-removed-from-wordpress-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [aytac](https://wordpress.org/support/users/aytac/)
 * (@aytac)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/#post-10984401)
 * Hi [@panosk20](https://wordpress.org/support/users/panosk20/),
 * Do you use any pagebuilder or any custom plugin? Because we couldn’t reproduce
   the issue.
 * FYI Do you use cookiebot addons feature for embed videos? Cookiebot supports 
   placeholder so you don’t need to add that “accept cookies” in the content, cookiebot
   will do that for you.
 * Take care,
 * Aytac
 *  Thread Starter [PanosK20](https://wordpress.org/support/users/panosk20/)
 * (@panosk20)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/#post-10984437)
 * Hi Aytac,
 * I do not use any page builder for the posts.
 * After a little bit of testing, i realised that the code works OK if you add a
   new post (or update an existing one) in the “Text” tab. If you switch to the “
   Visual” tab before saving, the javascript code from the link gets removed.
 * Working in the Text tab is fine for me. However, I shouldn’t be posting on this
   site in the future, different people from Monex should. My worry is that they
   may accidentally switch tabs, or go back to edit an existing post and that post
   loads with the “Visual” open.
 * Is there any way of preventing WordPress from deleting the javascript even when
   the Visual tab is on?
 * Also I am not sure what you meant by “FYI Do you use cookiebot addons feature
   for embed videos? Cookiebot supports placeholder so you don’t need to add that“
   accept cookies” in the content, cookiebot will do that for you.” Is there a link
   you can send me?
 * Many thanks
    Panos
 *  Plugin Author [aytac](https://wordpress.org/support/users/aytac/)
 * (@aytac)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/#post-10984571)
 * Hi [@panosk20](https://wordpress.org/support/users/panosk20/),
 * The cookiebot plugin has a submenu item called ‘Prior consent’. On that page 
   you can enable ‘Embed autocorrect’ option.
    This option will allow cookiebot 
   to scan the post contents for the video links from Youtube, Twitter, Vimeo and
   Facebook. These video links doesn’t need to have the cookiebot’s html attributes(
   data-src, data-cookieconsent). So you can use the default youtube share link 
   in your post content.
 * For example:
    <iframe width=”560″ height=”315″ src=”[https://www.youtube.com/embed/xxxxxx&#8221](https://www.youtube.com/embed/xxxxxx&#8221);
   frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
 * Cookiebot will scan the post content and find that link. It will then convert
   it to correct html attributes with data-src and data-cookieconsent.
 * On the prior consent page, you have also an option to show a placeholder. That
   does display a message on the frontend to allow the required cookie types.
 * Take care,
 * Aytac
    -  This reply was modified 7 years, 5 months ago by [aytac](https://wordpress.org/support/users/aytac/).
 *  Thread Starter [PanosK20](https://wordpress.org/support/users/panosk20/)
 * (@panosk20)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/#post-10988018)
 * That’s great!
 * Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘javascript:Cookiebot.renew() removed from WordPress posts’ is closed 
to new replies.

 * ![](https://ps.w.org/cookiebot/assets/icon.svg?rev=3200631)
 * [Cookiebot by Usercentrics - Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode](https://wordpress.org/plugins/cookiebot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookiebot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookiebot/)
 * [Active Topics](https://wordpress.org/support/plugin/cookiebot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookiebot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookiebot/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [PanosK20](https://wordpress.org/support/users/panosk20/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/javascriptcookiebot-renew-removed-from-wordpress-posts/#post-10988018)
 * Status: resolved