'Simple function used to construct analytics data for the OrderItem.
If the donation is associated with a course, additional fields will be populated with
course information. When no name or category is specified by the implementation, the
platform name is used as a default value for required event fields, to declare that
the Order is specific to the platform, rather than a specific product name or category.
Returns
A dictionary containing analytics data for this OrderItem.'

def analytics_data(self):

    data = super(Donation, self).analytics_data()
    if (self.course_id != CourseKeyField.Empty):
        data['name'] = unicode(self.course_id)
        data['category'] = unicode(self.course_id.org)
    else:
        data['name'] = configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)
        data['category'] = configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)
    return data
