You can forward Persona Inquiry SDK events to Google Tag Manager’s data layer for use in analytics, conversion tracking, and other GTM-powered workflows.
This integration uses a Persona-provided GTM template that receives events from the Embedded Flow SDK and pushes them to the data layer. No changes to the Persona SDK itself are required — you only need to add a small callback to your existing SDK configuration.
Copy the template code at the bottom of this page into a file named persona-gtm-template.tpl.
Once you have the file:
.tpl file.ready, start, complete, cancel, and error.In your existing Persona.Client configuration, add the onEvent callback:
Optionally, if you want to receive all events including click, form-update, and step-transitioned, add the eventsAllowlist parameter (requires SDK 5.8.0+):
You can pass custom attributes (e.g. internal user IDs, plan info, or any application-specific data) to every data layer push by providing a third argument to push. These are merged into the top level of the data layer event:
This produces data layer events like:
To use these values in other tags, create a Data Layer Variable with the name userId (or whichever key you need).
Events appear in the data layer as persona_<eventName> (e.g. persona_complete). Dashes in SDK event names are automatically converted to underscores for GA4 compatibility (e.g. document-camera-select becomes persona_document_camera_select).
The persona prefix is customizable in the tag’s Advanced Settings — you can change it to any prefix that fits your naming conventions.
Each event includes a personaEvent object with:
personaEvent.name — the original SDK event name (e.g. complete, cancel, click)personaEvent.metadata — the event metadataFor the full list of events and their metadata, see the Client Callbacks reference.
To fire another tag (e.g. Google Analytics, a conversion pixel) when an inquiry completes:
persona_complete.To access event data in other tags:
personaEvent.metadata.inquiryId (or any other property you need).You can use Persona’s hashed PII fields to power Google Ads Enhanced Conversions without exposing raw user data in the data layer.
To get started, contact Persona support to enable hashed fields on your inquiry template. Once enabled, the complete event metadata will include a hashedFields object containing SHA-256 hashed values for the configured fields (e.g. email_address, phone_number).
To set up Enhanced Conversions in GTM:
personaEvent.metadata.hashedFields.email_addresspersonaEvent.metadata.hashedFields.phone_numberpersona_complete.Google Ads Enhanced Conversions accepts pre-hashed SHA-256 values, so no additional transformation is needed in GTM.
Copy the contents below into a file named persona-gtm-template.tpl to import into GTM.