'Update the stats from Google Analytics.'

@classmethod
def reload_from_analytics(cls, verbose=False):

    from kitsune.sumo import googleanalytics
    counts = googleanalytics.pageviews_by_question(settings.GA_START_DATE, date.today(), verbose=verbose)
    if counts:
        close_old_connections()
        for (question_id, visits) in counts.iteritems():
            num = cls.objects.filter(question_id=question_id).update(visits=visits)
            if (num > 0):
                continue
            try:
                Question.objects.get(pk=question_id)
                cls.objects.create(question_id=question_id, visits=visits)
            except (Question.DoesNotExist, IntegrityError):
                continue
    else:
        log.warning('Google    Analytics    returned    no    interesting    data,    so    I    kept    what    I    had.')
