WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics Dashboard
[resolved] 2.0.1 incorrect graph displayed on dashboard (4 posts)

  1. brettbum
    Member
    Posted 3 years ago #

    After upgrading to wp 3.1 and GAB 2.0.1, the graph on wordpress dashboard, displays a date range that is one month behind the actual period.

    The date range displays correctly
    ex. 2011-01-25 to 2011-02-24

    But the line graph shows a period from

    2010-12-26 to about 2011-1-30

    BTW I noticed that 2.0.1 fixed some incompatibility issues that I had previously experienced on Hostgator and when I went to the plugin developers website, couldn't find a place to make a quick thank you donation. :)

  2. samandjt
    Member
    Posted 3 years ago #

    I have the same issue.

    To me (not an expert), the issue appears to be in gad-data-model.php, line 158:

    $current_date=$start_date_ts + (60*60*24*$count);

    I believe $start_date_ts is not the correct value, might be a scope issue.

    I replaced this code with
    $current_date= time() + (60*60*24*($count-30));

    this basically reacalculates $start_date_ts as a part of the $current_date calculation

    Hope it helps,

    Sam

  3. Carson McDonald
    Member
    Plugin Contributor

    Posted 3 years ago #

    This should be fixed in the 2.0.3 release.

  4. brettbum
    Member
    Posted 3 years ago #

    Yep, I can see it working again on two different installations. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic