Pass Campaign Name to google sheet?

I’ve got an automation that’s triggered by a contact opening or clicking any campaign. The trigger writes the date/time, name and company of contact to a google sheet, but I’d like also write the name of the campaign. If possible I’d also like to write whether the action was a click or open. Can anyone help with this? I do not have the option to use a third party app. I know Zapier would work but it’s not an option in this case, so I need to figure out a way to do this without a third-party app.