Moved more code around. Created the category-analytics.js file that contains the callback for the ebay query.