Hooks
modal_kit_pro_events_rate_limit
filter
Pro
PHP
Change how many Results requests one address can send in ten minutes. 120 by default.
Runs on each request to POST modal-kit-pro/v1/events, where pages send their Results events (shown, closed, converted, played and won), up to 20 events a request. The count is per address, for ten minutes from its first request.
Parameters
Parameter
Description
$limit
int
Requests per address per ten minutes: 120.
Returns
int The limit, cast to an integer. 0 or less refuses every request.
Example
A school or office network
Hundreds of people reach the site from one address.
add_filter( 'modal_kit_pro_events_rate_limit', function ( $limit ) {
return max( $limit, 600 );
} );
Good to know
Over the limit, the site answers HTTP 429 and that request’s events aren’t counted.
If every visitor seems to share one address, fix the address first: see modal_kit_pro_visitor_address.
Applied in modal-kit-pro/includes/Results.php.