• 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: https://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!

    https://www.ads-software.com/extend/plugins/google-analytics-dashboard/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Carson McDonald

    (@carson-mcdonald)

    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.

    Any plans to update this soon?

    The correct URL for SSL on google is:
    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

    (@dpe415)

    @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!

    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

    (@gravitylover)

    @davee

    I was correcting the incorrect code in the plugin, good job!

    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

    (@dpe415)

    Hi @ SymmetricS,

    The code provided in the Paste Bin example 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.