Codegen
Send events to Google Analytics 4 with Codegen
Avo generates a type-safe function for each event in your plan. You connect Google Analytics 4 through the destination interface: callbacks you fill in to pass each event on to Google Analytics 4.
The destination interface works with any event-based destination, so Google Analytics 4 can sit next to your other tools.
Docs: Destinations in Avo CodegenSet it up
- In Avo, create a destination and set its mode to Destination Interface in your source’s Codegen setup.
- Pull the generated code with the Avo CLI.
- Initialize Avo with your destination and fill in the callbacks that send to Google Analytics 4.