I need to fire an event once per session on session start. I have googled this and tried some solutions to no avail. For clarity I am using a LAMP stack. I need it to be an event so I can set a custom metric on the event for reports
Define what a session is. It's extremely unlikely that you want a counter that counts GA's sessions since GA already has a metric for sessions.
If your definition of session is just a time-between-actions story, then just:
2.1 Make a tag that sends the session event on every pageview
2.2 Make a tag that sets your session cookie with the expiration time set to the duration of the session.
2.3 Make CJS (or the cookie variable) that checks if that cookie is present.
2.4 Now finally make the 2.2 tag to autofire always after 2.1 fires. And add an exception for 2.1 to not fire it whenever your 2.3 CJS (or cookie) variable detects the session cookie.
Boom! Now you have a mechanism that fires the tag only if some time passed in between user interactions.
Well, ok, to be fair, I'm doing it only for pageviews in this example, but you can do it for all interactions by just making the 2.2 fire after all tags that you deem "interactional" for the purpose of your custom session tracking.
I actually figured it out with the help of this tutorial: https://digilitica.com/solutions-and-services/digital-marketing-solutions/fire-a-tag-just-once-per-session-only-on-first-pageviewgtm/
Then create a GA4 event with the exact same triggers (The exception in the custom html may not be necessary but I add it to prevent the tag continuously firing)