Title: [Plugin: Google Analytics Dashboard] Add HTTPS support to the dashboard widget
Last modified: August 20, 2016

---

# [Plugin: Google Analytics Dashboard] Add HTTPS support to the dashboard widget

 *  [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/)
 * Hi,
 * Thanks for a great plugin. Unfortunately, many of the sites I admin use SSL/HTTPS
   for their WordPress admin area and the URL for the Google Chart displayed by 
   this plugin doesn’t account for that. This oversight leads to partially secure
   browser messages when viewing the WP Dashboard.
 * I’ve tweaked the function `create_google_chart_url()` starting on line 183 in`
   gad-data-model.php` to accommodate secure WordPress installs. Here’s a pastebin
   with the updated code for that function: [http://pastebin.com/hWCmQSKc](http://pastebin.com/hWCmQSKc)
 * Maybe you could incorporate this change into the plugin’s source? Otherwise, 
   at least this will help me and anyone else looking to tweak the plugin with witha
   good bookmark.
 * Thanks!
 * [http://wordpress.org/extend/plugins/google-analytics-dashboard/](http://wordpress.org/extend/plugins/google-analytics-dashboard/)

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

 *  Plugin Contributor [Carson McDonald](https://wordpress.org/support/users/carson-mcdonald/)
 * (@carson-mcdonald)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965645)
 * Thanks for the patch. I will integrate it in the next update I make. I wish I
   would have seen this before I released the 2.0.4 version.
 *  [Mindshare Labs, Inc.](https://wordpress.org/support/users/mindshare/)
 * (@mindshare)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965651)
 * Any plans to update this soon?
 *  [gravitylover](https://wordpress.org/support/users/gravitylover/)
 * (@gravitylover)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965672)
 * The correct URL for SSL on google is:
    [https://chart.googleapis.com/](https://chart.googleapis.com/)(
   this causes no errors)
 * Other key areas to update:
 * gad-admin-pages-posts-ui.php
 *     ```
       <img width="90" height="30" src="https://chart.googleapis.com/chart?chs=90x30&cht=ls&chf=bg,s,FFFFFF00&chco=0077CC&chd=t:<?php echo $cvals; ?>&chds=<?php echo $minvalue; ?>,<?php echo $maxvalue; ?>"/>
       ```
   
 * gad-widget-data.pjp
 *     ```
       return '<img width="90" height="30" src="https://chart.googleapis.com/chart?chs=90x30&cht=ls&chf=bg,s,FFFFFF00&chco=0077CC&chd=t:' . $cvals . '&chds=' . $minvalue . ',' . $maxvalue . '"/>';
       ```
   
 *  Thread Starter [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965673)
 * @gavitylover,
 * If you had viewed my pastebin link above, you’ll see that the URL you reference
   is the one that I had implemented. I’m not sure what your point is regarding 
   the correct URL for SSL.
 * Thanks for the tip regarding other locations. However, if the wp-admin area isn’t
   SSL secured, then there is no reason to use the SSL URL’s in the Charts API code.
   Hence, the HTTPS check in the pastebin (above).
 * Cheers!
 *  [Mindshare Labs, Inc.](https://wordpress.org/support/users/mindshare/)
 * (@mindshare)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965699)
 * When is this fix going to be released? It would be worth the simple push to SVN
   even if this is the only thing getting fixed…
 *  [gravitylover](https://wordpress.org/support/users/gravitylover/)
 * (@gravitylover)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965700)
 * [@davee](https://wordpress.org/support/users/davee/)
 * I was correcting the incorrect code in the plugin, good job!
 *  [SymmetricS](https://wordpress.org/support/users/symmetrics/)
 * (@symmetrics)
 * [13 years ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965719)
 * Hello there,
 * I have the 2.0.4 version and this problem has not been fixed.
    I have replaced
   the create_google_chart_url() functions as specified above and it worked. YAY!
   My only problem is that is working only in the post area, in the Dashboad – Home
   is still not working.
 * Could you please provide the code for fixing this also?
 *  Thread Starter [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [13 years ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965720)
 * Hi @ SymmetricS,
 * The code provided in the [Paste Bin example](http://pastebin.com/hWCmQSKc) will
   correct all non-secure instances in the plugin. I’m using it right now on several
   sites without issue.
 * You may have another plugin/theme/link that is pulling insecure content or maybe
   its just a caching/browser issue. You’ll have to double-check the HTML source
   for your Dashboard page to see what is causing the insecure warning.
 * Cheers,

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

The topic ‘[Plugin: Google Analytics Dashboard] Add HTTPS support to the dashboard
widget’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-analytics-dashboard.svg)
 * [Google Analytics Dashboard](https://wordpress.org/plugins/google-analytics-dashboard/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-dashboard/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-dashboard/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-dashboard/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-dashboard/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-dashboard/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 8 replies
 * 5 participants
 * Last reply from: [DaveE](https://wordpress.org/support/users/dpe415/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/plugin-google-analytics-dashboard-add-https-support-to-the-dashboard-widget/#post-2965720)
 * Status: not resolved