How to Integrate with Segment

Segment is a powerful CDP platform to collect, clean, and control customer data. By using the Segment API in Digioh you can capture valuable first party data from web forms, landing pages, and subscriber paywalls, and send it to Segment. In addition, when your users enter their email in a form, Digioh can identify that user, tying their Segment persona to an actual person.

Here is an example of how you can pass data to Segment when a user submits a form. In “Custom JS Boxes”, create a new snippet on After Box Submit:

if (typeof !== 'undefined') {
    let sObj = {}; =;
    sObj.custom1 = x.custom_1;  //and any other form fields you want
    sObj.digiohBoxName = boxapi.getName();
    sObj.pagePath = api.getPagePath(); = api.getClientCountryCode(); = api.getClientCity();'Digioh Form Submission', sObj);, sObj);
} else {
    console.log('Segment API not found');

This will pass select form fields and analytics data anytime some submits the form. You can also pass data when a box is displayed and when a box is closed. The Digioh JavaScript API provides a wide range of functions and data that you can send to Segment.

We also have the ability to target boxes based on your Segment Persona data, please contact us to help you set that up.