Dynamic Capture Text

The Dynamic Capture Text feature allows you to personalize your Captures based on information you already know about users that are already logged into your Site.

To use this feature you need to add an additional script to your page and populate it with information about the User:

<script>
        var Capture = Capture || [];
        Capture.push(['name', 'John Doe']);
        Capture.push(['fname', 'John']);
        Capture.push(['lname', 'Doe']);
        Capture.push(['email', 'john@doe.com']);
        Capture.push(['car', 'Land Rover']);
        Capture.push(['model', 'Discovery']);
        Capture.push(['mileage', '20,245']);
        Capture.push(['service', 'no']);
        Capture.push(["a1c2a", "url", "https://www.landrover.com/thanks"])
</script>

By default using Name and Email allow you to pre-fill these fields for the user:

Gleam interface showing subscribe to newsletter fields prefilled

You can go a step further and start using some of the Dynamic Text data in your Captures. To do this you can choose any argument to replace during setup and provide:

{{name|fallback}}

The first argument should match the exact data that you want to replace. In this case we'll look at name, then replace it with John Doe. However, if that argument isn't present then we'll fallback to second argument.

Gleam interface showing subscribe to newsletter with dynamic text data to personalize name
Tip

You need to consider text that will work well with both your argument and also the fallback text.

Once setup then this is what it might look like for the end user, as you can see it's a much more compelling and personalized Capture compared to the original.

Gleam interface showing subscribe to newsletter text replaced with Welcome John Doe

See Next Article

Capture Data

Learn more about the different types of data collected for your Gleam Captures campaign.