Personalized Event Handling
With this new feature, you can enhance the functionality of your DXP ToolKit Persona Rules by adding a "Callable Function on Success." This option allows users to define a custom JavaScript function that will be triggered when the specified rule is successfully triggered.
How to Use Callable Function on Success:
- Define Your Function:
- When personalizing your content, in the DXP ToolKit configuration section, you will find a new input field called "Callable Function on Success."
- Enter the name of the custom JavaScript function you want to trigger when the rule is met.
- Make sure the function is properly defined in your WordPress theme's or plugin's files.
- Ruleset Match:
- When a page containing personalized content is visited, the DXP ToolKit system will check whether the persona rules are met or not.
- If the ruleset is successfully matched, the "Callable Function on Success" will be executed.
- Executing Custom Function:
- Once the ruleset is met and the "Callable Function on Success" is executed, the specified custom function will be triggered, allowing you to implement any desired custom actions or features.