def track_created_event(request, event_name, course, obj, data):
 if (len(obj.body) > TRACKING_MAX_FORUM_BODY):
  data['truncated'] = True
 else:
  data['truncated'] = False
 data['body'] = obj.body[:TRACKING_MAX_FORUM_BODY]
 track_forum_event(request, event_name, course, obj, data)

def track_created_event ( request , event_name , course , obj , data ) : if ( len ( obj . body ) > TRACKING_MAX_FORUM_BODY ) : data [ 'truncated' ] = True else : data [ 'truncated' ] = False data [ 'body' ] = obj . body [ : TRACKING_MAX_FORUM_BODY ] track_forum_event ( request , event_name , course , obj , data )
send analytics event for a newly created thread .