Documentation

Getting Started
Gleam Updates
Capture
Competitions
Galleries
Rewards
Installation
Advanced
Integrations
Action Types
Guides

Prefilling User Details

Sometimes you may want to prefill user details within the Gleam widget to prevent users from having to enter details twice. This may be if a user is already logged into your website, or if you're redirecting users to a Gleam widget after completing another form first.

Applications that support Prefilling:

Javascript API

The first way you can prefill data is by including some extra Javascript on your page. This should be included after your embed code.

<script>
        var Gleam = Gleam || [];
        Gleam.push(['name', 'John Doe']);
        Gleam.push(['email', 'john@doe.com']);
</script>

The main things you can pass are:

  • Name
  • Email
  • DOB

It will also match up with any additional Custom Fields that you have setup.

URL Parameters

The second way you can prefill is to pass parameters to the URL. This will only work if you send users to the Gleam Hosted Landing Page or use the iFrame embed option.

You must also encode the parameters & parameter names.

?name=John%20Doe&email=john%40doe.com

You can see how this would work sending users to our demo competition with Prefilling active:

https://gleam.io/iR0GQ/gleam-demo-competition?name=John%20Doe&email=john%40doe.com

Again this method supports:

Connect With Us