<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Passing data from login form to webhook]]></title><description><![CDATA[<p dir="auto">I have a URL param on the login page that I want to pass to a login success webhook handler.</p>
<p dir="auto">How can I do so?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/2503/passing-data-from-login-form-to-webhook</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 01:12:53 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2503.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Sep 2023 20:30:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Passing data from login form to webhook on Fri, 15 Sep 2023 20:33:47 GMT]]></title><description><![CDATA[<p dir="auto">There is no official way to do this but you can overload one of the custom fields as <a href="https://github.com/FusionAuth/fusionauth-issues/issues/1660" rel="nofollow ugc">outlined here</a>.</p>
<p dir="auto">Here's sample code to do this, assuming that the parameter you want to track is <code>registrationCode</code>.</p>
<pre><code>&lt;script&gt;
const queryString = window.location.search;
let urlParams = new URLSearchParams(queryString);

const registrationCode = urlParams.get('registrationCode');

if (registrationCode) {
    console.log('New query string found of '+ registrationCode);
    let input = document.querySelector('.customParam');
    input.setAttribute('value', 'registrationCode = ' + registrationCode);
    console.log(input.type, input.name, input.value);
}
&lt;/script&gt;
</code></pre>
<p dir="auto">Then, in the login form, you want to make sure you have this input field:</p>
<pre><code>&lt;input class="customParam" type="hidden" name="metaData.device.description"/&gt;
</code></pre>
<p dir="auto">The value of <code>metaData.device.description</code> in the webhook event will be the value of the <code>registrationCode</code> parameter.</p>
]]></description><link>https://fusionauth.io/community/forum/post/6568</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6568</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Fri, 15 Sep 2023 20:33:47 GMT</pubDate></item></channel></rss>