Skip to content

Targeting Action Custom Triggers

Targeting Actions in Segmentation can be optionally triggered by the browser by using the "fireCustomTrigger" function on the "fanplayr" runtime API.

When a Targeting Action is configured to have a custom trigger, the system will wait for the trigger before displaying the attached widget. The trigger does not persist through the session so you will have to invoke it on every necessary page view - unless the targeting action is configured to only apply trigger conditions once per session.

You are not limited to the number of triggers that can be fired per page view.

Syntax

javascript
fanplayr.fireCustomTrigger(trigger_id);

Parameters

ParameterTypeRequiredDescription
trigger_idstringYesThe unique identifier of the custom trigger to fire, as configured in the Targeting Action setup.

Return Value

None (undefined). This method does not return a value; it has a side effect of firing the specified trigger within the Fanplayr runtime.