Customer data passed to the quiz will be automatically used to pre-populate the form fields in the opt-in form. If all form fields have been provided the opt-in form will be automatically submitted and not shown to the quiz taker.

Using the iFrame Embed Code

If you are using the iFrame embed code to embed your quiz on your website, you can pass existing customer data to the quiz using URL parameters.

You can append data to the end of the source URL of the iFrame using the following formula:

&user.field_id=field_value

For example, you could pass the value of a customer's email address and first name by appending the following string to the end of the source URL:

&user.email=example@tryinteract.com&user.first_name=John

Here is a list of acceptable field IDs that you can pass via the URL parameters:

  • Email Address - user.email
  • First Name - user.first_name
  • Last Name - user.last_name
  • Company Name - user.company
  • Phone Number - user.phone
  • Zip Code - user.zip

Putting all of these steps together, your iFrame embed code should now look like the following using the current example:

Using the Javascript Embed Code

If you are using the Javascript embed code to embed your quiz on your website, you can pass existing customer data to the quiz updating the user attribute in the options of the embed code.

You can add customer data to the user object in the Javascript embed code using the following formula:

user: { field_id: "field_name", ... }

For example, you could pass the value of customer's email address and first name by appending the following object attribute to the options object (more info on this below):

user: { email: "example@tryinteract.com", first_name: "John" }

Here is a list of acceptable field IDs that you can pass via the user object:

  • Email Address - email
  • First Name - first_name
  • Last Name - last_name
  • Company Name - company
  • Phone Number - phone
  • Zip Code - zip

Putting all of these steps together, your Javascript embed code should now look like the following using the current example:

Did this answer your question?