> ## Documentation Index
> Fetch the complete documentation index at: https://help.privy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Liquid in Conversion Javascript

> Inject information related to a sign up event into your custom JS code. 

Privy supports the use of Liquid variables in your custom conversion JavaScript (JS). These variables allow you to inject information related to a signup event, including contact and display information, into your custom JS code. 

## Supported variables

The following variables are supported in your conversion JS:

* `{{contact.email}}` — The email address of the contact who just signed up.

* `{{contact.first_name}}` — The first name of the contact who just signed up.

* `{{contact.last_name}}` — The last name of the contact who just signed up.

* `{{signup.coupon_code}}` — The coupon code that was shown to the contact who just signed up.

* `{{campaign.id}}` — The ID of the display associated with the contact's signup. 

* `{{contact.custom_fields.custom_name}}` - The value associated with a custom field that was included in the display's form.

### Variable requirements + limitations

The following requirements and limitations apply to custom fields:

* A custom field variable must exactly match the name of the field in the Privy form.

* The `{{contact.custom_fields}}` variable cannot be used; only individual fields are supported.

* The only contact data that will be available for Liquid variable rendering after a form is submitted is the data that was collected during the current signup event.

## Include variables in your code

Liquid variables and their associated attribute values are included in your code by applying a specific format to the custom JavaScript snippet. Typical use cases include:

### Print to console

<img height="200" alt="Print console code example" src="https://mintcdn.com/privy/soCpR44lUIpPYTY_/images/displays/js-print-to-console.png?fit=max&auto=format&n=soCpR44lUIpPYTY_&q=85&s=d4745685907483c91e65b616e4dd25e8" data-path="images/displays/js-print-to-console.png" />

​If a user named "Joe Smith" with the email "[joesmith@example.com](mailto:joesmith@example.com)" just signed up, the above code will print "Joe Smith ([joesmith@example.com](mailto:joesmith@example.com)) just signed up!" to the console.

### Redirect and pass a variable value

<img height="200" alt="Redirect and pass a variable code example" src="https://mintcdn.com/privy/soCpR44lUIpPYTY_/images/displays/js-redirect.png?fit=max&auto=format&n=soCpR44lUIpPYTY_&q=85&s=5bc7ac43675b07942d100cfa608fde37" data-path="images/displays/js-redirect.png" />

The above code will redirect the user after signing up and pass the display id as a URL parameter to the new page.
