Is it best to purchase this online prior to my trip or just wait and purchase it in Rome?
No need to purchase it in advance. Big info office right at the train station that sells it, among many other convenient places around town.
I don't think you need to buy in advance, but I do recommend you purchase at the train station. (which we did) Several people have posted trying to purchase them at their first site, only to be told they were out of them. Very inconvenient since they had to leave and go elsewhere to purchase.