Title: Please account for HTTPS when including advertisement.js
Last modified: January 31, 2020

---

# Please account for HTTPS when including advertisement.js

 *  [Flipeleven](https://wordpress.org/support/users/flipeleven/)
 * (@flipeleven)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/please-account-for-https-when-including-advertisement-js/)
 * We have to patch your plugin each time you make an update because we get an insecure
   content error. admin/assets/js/advertisement.js is always loaded over http instead
   of detecting whether the site is using https.
 * In advanced-ads/classes/frontend_checks.php around line 558 we add a test for
   HTTPS so the script can be loaded securely if necessary. We would appreciate 
   something like that added to future versions of the plugin.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/please-account-for-https-when-including-advertisement-js/#post-12386282)
 * Hi Flipeleven,
 * thanks for reaching out.
 * I checked the code you are referring to and found that it does not explicitly
   use a protocol. Instead, it used the constant `ADVADS_BASE_URL` which is used
   in a lot of other places in the code. If there was a general problem with it 
   then you would see a lot more warnings, especially in the admin panel.
 * Since I cannot reproduce an issue on any of my sites that use HTTPS, I believe
   there might be some configuration gone wrong on your server.
 * You could look through the code to see where else `ADVADS_BASE_URL` is used and
   then find these URLs in the generated HTML. A couple of images on the ad edit
   page or on the placement page in the backend use it, so you could check if they
   use HTTPS or HTTP. If that works and the `ADVADS_BASE_URL` only breaks in the
   mentioned position then I would suspect the issue with wrong HTTPS settings in
   your site’s frontend.
 * Thanks,
    Thomas

Viewing 1 replies (of 1 total)

The topic ‘Please account for HTTPS when including advertisement.js’ is closed to
new replies.

 * ![](https://ps.w.org/advanced-ads/assets/icon-256x256.gif?rev=2773443)
 * [Advanced Ads – Ad Manager & AdSense](https://wordpress.org/plugins/advanced-ads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-ads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-ads/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-ads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-ads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-ads/reviews/)

## Tags

 * [Console error](https://wordpress.org/support/topic-tag/console-error/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 1 reply
 * 2 participants
 * Last reply from: [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/please-account-for-https-when-including-advertisement-js/#post-12386282)
 * Status: not a support question