Account Engagement form key event tracking
To track key events from your Account Engagement (Pardot) form, add the code below to the Thank You Code section under Completion Actions. The same code works for standalone landing pages and for for…
To track key events from your Account Engagement (Pardot) form, add the code below to the Thank You Code section under Completion Actions.
The same code works for standalone landing pages and for forms embedded on a website through an iframe.

New form: generate the code
Open the Thank You Code Generator, pick the key event, type the exact name of your form and submit. You get the finished code back, together with a check on the name.
Use the generator rather than the snippet below. Almost every tracking problem we find is a mistyped form name, and the generator catches those before the code ever reaches the form. It also works for a form you created minutes ago. The generator does check whether the name is already known in our data warehouse, but only as information, so a form that is not in there yet still gets its code.
If you add a redirect, the generator gives you the notice text for the Thank You Content area as well.
Or write the code yourself
<script type="text/javascript">
var conversionEvent = 'commercial_request';
var formName = 'Your_form_name';
var userEmail = '%%email%%';
</script>
conversionEvent is the key event that fits your form. Possible values:
demo_request
event_registration
newsletter_subscription
resource_request
webinar_registration
Find out more about our Google Analytics 4 conversion setup.
formName is the exact name of the form.
Oct 19 instead of Oct'19, and L expérience instead of L'expérience. The generator refuses to hand out code in this case and tells you to rename the form.userEmail stays as it is. See below for what it does.
Existing form: let n8n check it
For a form that already exists, do not edit by hand. n8n tells you whether the current code is correct and gives you a corrected version to paste back.
- Open URL to Asset Name and paste the URL of your landing page or form.
- n8n shows you the asset with its name and ID.
- Click Check tracking.
All you need is the URL. Do not start from the Form Check directly, it asks for the form ID and that is hard to find in the interface.
What the userEmail line does
%%email%% is an Account Engagement merge field. It is replaced with the address the visitor entered.
The address is hashed before it reaches any advertising platform. The platforms never see it in plain text, they only use the hash to match the conversion to an account. This matters where cookies are missing or blocked, which is most of the time.
Leave the line in even if you are unsure. If the field is empty or the merge field does not resolve, the code skips it and everything else keeps working.
How to add a redirect
If you want to redirect the visitor after submission, add a redirectURL variable.
The visitor is redirected 3 seconds after submitting. During that time the submission is sent to Google Analytics and the ad platforms.
<script type="text/javascript">
var conversionEvent = 'commercial_request';
var formName = 'Your_form_name';
var userEmail = '%%email%%';
var redirectURL = 'https://www.sdworx.com';
</script>
.pdf.Depending on the language of the landing page, add the matching text to the Thank You Content area:

Please click here if you are not automatically redirected.
Klik hier als u niet automatisch wordt doorverwezen.
Cliquez ici si vous n'êtes pas automatiquement redirigé.
Bitte klicken Sie hier, falls Sie nicht automatisch weitergeleitet werden.
How did we do?
Landbot and Google Analytics
Teamtailor ad campaign links (UTM parameters)