If you’d like to segment a campaign by using a specific parameter that is stored on your site, you can use custom properties. The custom_properties variable allows you to pass any custom data to Talkable as a collection of Key-Value pairs. Those can be used for various segmentation purposes, as both join criteria and incentive criteria can leverage these custom properties.


Note: it is only for custom-defined properties that Talkable doesn't track at the moment. Things like subtotal and minimal order value can be used for segmentation already without changing integration, so you can skip 1st step.


This can be done in two steps:


  1. Append a custom segmentation property to the already existing integration script:


_talkableq.push(['register_affiliate', {

  custom_properties: {

    country: ‘US’

  }

}]);


       or in case you want to add this specific property on the thank you page specifically (for example, to segment only Post-purchase campaign), you can modify existing Post-purchase script: 


var _talkable_data = {

  purchase: {

    order_number: '',

    subtotal: '',

  },

  custom_properties: {

    vip_member: ‘true’

  }

};

_talkableq.push(['register_purchase', _talkable_data]);



Important: Property names (e.g. eye_color) can contain lowercase letters, numbers and _ only and cannot begin with a number.


  1. Navigate to Campaign Rules and add Join criteria based on the property set, as per the example below



{% if advocate_info.custom_properties.vip_member == 'true %}

true 

{% endif %}