Skip to content

Support / Developers

conversion_bridge_is_crawler

Description

The conversion_bridge_is_crawler filter decides whether a tracking request came from a search engine or other crawler. Crawler events aren't stored and aren't sent server-side.

Using this filter turns off fast page view tracking, because that route runs without other plugins.

Usage

add_filter( 'conversion_bridge_is_crawler', 'my_hook_function', 10, 2 );

Parameters

  1. $is_crawler (boolean)
    Whether the user agent matched Conversion Bridge's crawler list
  2. $user_agent (string)
    The visitor's user agent

Example

add_filter( 'conversion_bridge_is_crawler', 'my_hook_function', 10, 2 );
function my_hook_function( $is_crawler, $user_agent ) {
    // Treat a site monitoring service as a crawler.
    if ( false !== stripos( $user_agent, 'my-uptime-monitor' ) ) {
        return true;
    }
    return $is_crawler;
}

Still need help?

If you have not yet found your answer in the documentation articles, please contact support