WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics Dashboard
[resolved] Graph shows wrong dates (5 posts)

  1. midwestkel
    Member
    Posted 3 years ago #

    I just noticed that the graph is showing the traffic for February but the dates are January dates.

    I figured it's just a minor bug.

  2. samandjt
    Member
    Posted 3 years ago #

    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

  3. Carson McDonald
    Member
    Plugin Contributor

    Posted 3 years ago #

    Thanks, I believe that was it. I have fixed it so that it will be pushed out in the next release. Should be this week.

  4. Carson McDonald
    Member
    Plugin Contributor

    Posted 3 years ago #

    The new release is out (2.0.3) so I think that should have this fixed. Anyone want to verify that it looks good?

  5. midwestkel
    Member
    Posted 3 years ago #

    I just updated last night and can verify that it works and displays the proper dates. Thanks for all your hard work!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic