Setting Custom Visitor Properties with Pageview API

You can set visitor properties directly using the Pageview API. This allows you to send custom visitor attributes through to Crobox as part of your pageview events.

Here's how you can use this feature:

crobox.push(function(crobox) {
  // The Crobox API is now initialized and methods are available
  crobox.pageview({
    pt: crobox.PAGE_INDEX,
    lc: "en-AA", 
    // The cp (custom property) field lets you send any custom visitor property
    cp: {
      cuddles: "yes"
    }
  });
});

Configuring Custom Properties in the Crobox App

After implementing the above code, follow these steps to complete the setup in the Crobox app:

  1. Go to Settings > Visitor Properties.

  2. Click Create New Property.

  3. Name the property using the same key you send in your pageview (e.g. cuddles).

  4. Set the property type accordingly, such as boolean if the pageview value is a yes/no function.

Using Custom Visitor Properties in Crobox

After setup, you can use these custom visitor properties in two main ways:

  • Targeting visitors: Use them to segment and personalize your Crobox experiences (e.g. show a specific campaign only to visitors where cuddles = yes).

  • Filtering in analytics: Filter reports and analytics dashboards based on these properties to gain deeper insights.

Contact your Account Manager for additional assistance.

FAQ

What happens if I send a custom property in pageview() but don’t define it in the Crobox Admin interface?

The property will not be recognized or usable for targeting or analytics. To activate a custom property, you must create a matching Visitor Property in the Crobox panel under Settings > Visitor Properties, using the exact same key and specifying the correct value type (e.g. string, boolean, number).

Can I update a visitor’s custom property value after the first pageview?

Yes. The value of a custom visitor property can be overwritten by subsequent pageview() calls. The latest value sent for that property will be associated with the visitor moving forward.

How do custom visitor properties differ from Crobox’s built-in targeting criteria (e.g. location, device, language)?

Built-in properties are automatically collected by Crobox and require no setup, while custom visitor properties are manually defined and implemented via the cp field in the pageview() API. They enable you to extend targeting to business-specific attributes (e.g. subscription level, gender preference, login status) that Crobox wouldn’t otherwise know.

Last updated

Was this helpful?