Targeting Segment Persona Traits with Digioh Conditions

If you have the Segment Persona API, the Digioh Segment Integration App also supports targeting Digioh boxes to traits (and audiences). Install that app before getting started here, then set up as follows:

1. Digioh needs an integration object to securely store your credentials. Go to the integrations tab, click New Integration, find Segment (Personas) in the list under CDP, and give your integration a meaningful name, e.g. indicating whether it is your production or QA environment.

2. Enter the Access Token and Space ID. Instructions on how to find this in Segment are linked from here.

3. Note the 5 digit Integration ID from the list on the main Integrations page, and your Segment Space ID. Then under the Admin menu open Account Metadata. If you don’t have access to the Admin Menu, contact Digioh support for help. Input and save key values for seg_persona_integration_id and seg_persona_space_id.

4. If you are testing out this feature and want to control where it activates, you can configure seg_persona_hostlist in Account Metadata with a (optionally comma separated) whitelist of domains.

So for example, you might set,

5. Publish your Digioh account and you’re ready to start targeting your Segment personas!

How to Target Traits in Box Conditions

When users start a session on your site, Digioh will look up their traits in Segment in real-time, then cache them for the remainder of the session. The app stores persona traits in a JavaScript object called seg_traits, so you will use JavaScript Variable conditions for your Box:

Use your trait name, with prefix seg_traits. – the dot is important, so for example seg_traits.num_purchases, if your trait name is num_purchases.

IMPORTANT: If the trait does not exist, or if Segment isn’t running in the browser for any reason (e.g. blocked by an Ad Blocker), then the condition value will always be false. You should avoid negative targeting with seg_trait conditions (e.g. does not equal), because this may result in unexpected behavior. Instead, always use positive targeting like equals, contains, greater/less than, etc.

How to use Persona Traits in Box Content

You can extract traits and display them in the box content. First, you’ll need to install the Universal Merge Tags App. Then, with a merge tag you can display any trait in a text, button, or HTML element, and even as a part of a redirect URL.

The syntax is: [SEG_TRAIT|traitName|optionalDefault]

Questions, comments, problems? Let us know at