Google Analytics records hosted authentication events for one environment: sign-in, sign-up, and waitlist. Authdog sends them with the Measurement Protocol. You do not add the gtag snippet to the hosted pages yourself.
Create the Measurement Protocol secret
- In Google Analytics, open the GA4 property.
- Copy the Measurement ID (
G-XXXXXXXXXX). - Under Admin > Data streams > your stream > Measurement Protocol API secrets, create a secret and copy it.
Enable the add-on
In the Authdog console:
- Select the project and environment.
- Open Authentication > Add-ons.
- Select Google Analytics.
- Enter the Measurement ID.
- Enter the Measurement Protocol API secret. It is write-only. Leave it blank on a later edit to keep the stored secret.
- Enable the add-on and save.
By default Authdog forwards:
signin_successnew_useremail_password_signup_successuser_joined_waitlist
Development and production need their own properties, or at least their own streams, so test traffic does not land in the production property. Add-on configuration does not copy between environments.
Test it
- Sign up a user in the environment you configured.
- In GA4, open Realtime and confirm the event arrives. Measurement Protocol events can take a short time to show outside Realtime.
- Repeat a sign-in and confirm
signin_successas well.
A missing Measurement ID is rejected when you enable the add-on. A wrong API secret makes Google drop the hit. Authdog still completes sign-in.
Related
| Read | To learn how to |
|---|---|
| Authentication add-ons | Where Google Analytics sits next to the other add-ons |
| Marketplace | The listing for this integration |