Using onNewVisit

I’d like to implement an onNewVisit that runs one call to an API and records data for two dimensions. I see that this method has a placeholder in the Dimension class that was automatically generated by the console, but can it be moved to the main Plugin file instead?

I’d like to only have to do one API for each new visit.