did you review developers.marketo.com?
Gerard, the most scalable method to log end-user activity and tie it to Marketo lead records is the Munchkin API, which as Josh pointed out is documented in the Developers area.
By default, when Munchkin.js is present on a page, the page view will be logged as a Visited Web Page activity and clicks on the page (for example, on A tags) will be logged as Clicked Link activities. This is what I would call the "opt-out" scenario because everything is logged unless you tell it not to. You can also roll out a more managed "opt-in" Munchkin environment where only interesting events are logged (such as using a function in your SaaS app) by manually calling Munchkin.munchkinFunction('clickLink'...). Again, this is gone over in the docs.