Storing customer properties

Storing customer properties

Introduction

In previous chapters, you've seen how tracking customer events with content is important for gaining insights and optimizing their experience. There are situations where certain characteristics about a customer are just as important.

Similar to events that you can capture as they happen, you can also trigger customers to volunteer data about themselves through your web app. This could be characteristics like their job title or industry they work in. Knowing if a customer is a developer, for example, can help you direct them to more technical content.

If you haven't yet done so, check out the Fundamentals guide for key data collection concepts. Before diving in, make sure you’ve already added the Prepr tracking code to your web app.

Recording customer characteristics

Similarly to how you can record and send events to Prepr, you can send some customer-specific data.

For example, when a customer fills a specific value in a form on your page, you can send the entered value as a Tag on the customer profile. Use the javascript function below to store a tag for the customer, for example, to indicate that they are a health care worker.

prepr('event', 'Tag', ['healthcareworker']);  

In the example code below we send a Tag to indicate when the customer chooses a job title from a dropdown field.

<html>
    ...
    <body>
        ...
        <select onchange="prepr('event', 'Tag', ['healthcareworker']);">...</select>
    </body>
</html>

Was this article helpful?

We’d love to learn from your feedback