# Store referral info in registration flow

**URL:** <https://forum.keycloak.org/t/store-referral-info-in-registration-flow/17552>\
**Category:** Getting advice\
**Created:** [September 22, 2022, 9:39am UTC](https://forum.keycloak.org/t/store-referral-info-in-registration-flow/17552 "2022-09-22T09:39:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wb256](https://avatars.discourse-cdn.com/v4/letter/w/db5fbb/32.png) [@wb256](https://forum.keycloak.org/u/wb256)\
**Post date:** [September 22, 2022, 9:39am UTC](https://forum.keycloak.org/t/store-referral-info-in-registration-flow/17552/1 "2022-09-22T09:39:42Z")

</div>

How could a cookie value be stored when an user signs up via Keycloak?

For example, we might have the cookie `referral` with the value `abcd`. Is there a way to store this value in the user table when a user signs up via Keycloak (either through email or Google/Facebook social login)?

Alternatively, could this be done with a passed parameter?

---

<div class="post-metadata">

**Author:** ![wb256](https://avatars.discourse-cdn.com/v4/letter/w/db5fbb/32.png) [@wb256](https://forum.keycloak.org/u/wb256)\
**Post date:** [September 22, 2022, 3:07pm UTC](https://forum.keycloak.org/t/store-referral-info-in-registration-flow/17552/2 "2022-09-22T15:07:45Z")

</div>

This github issue seems to have a possible solution: [How to pass custom attributes to the registration form? · Discussion #9449 · keycloak/keycloak · GitHub](https://github.com/keycloak/keycloak/discussions/9449)

However, I’m still figuring out how to do this with the Java SPI. The way I understand it is that 2 authentication steps needs to be implemented to pass the value around.
