Yes. The plugin provides the following actions and filters: // Before the shortcode is rendered add_action( 'gaoo_before_shortcode', 'my_before_shortcode', 10, 2); function my_before_shortcode( $tracking_code, $current_status ) { // $tracking_code - The measurement ID in use: "G-XXXXXXXXXX" // $current_status - The current status of the visitor: activate or deactivate } // After the shortcode is rendered add_action( 'gaoo_after_shortcode', 'my_after_shortcode', 10, 2); function my_after_shortcode( $tracking_code, $current_status ) { // $tracking_code - The measurement ID in use: "G-XXXXXXXXXX" // $current_status - The current status of the visitor: activate or deactivate } // Before the JavaScript code that disables GA is output add_action( 'gaoo_before_head_script', 'my_before_script', 10, 1); function my_before_script( $tracking_code ) { // $tracking_code - The measurement ID in use: "G-XXXXXXXXXX" } // After the JavaScript code that disables GA is output add_action( 'gaoo_after_head_script', 'my_after_script', 10, 1); function my_after_script( $tracking_code ) { // $tracking_code - The measurement ID in use: "G-XXXXXXXXXX" } // The GA4 measurement ID in use add_filter( 'gaoo_get_ua_code', 'my_ga_tracking_code', 10, 2 ); function my_ga_tracking_code( $tracking_code, $ga_plugin ) { // $tracking_code - The measurement ID in use: "G-XXXXXXXXXX" // $ga_plugin - The selected source of the measurement ID } // Whether the page should be reloaded after the click add_filter( 'gaoo_force_reload', 'my_force_reload', 10, 1); function my_force_reload( $force ) { // $force - "true" = reload the page; "false" = do not reload } // The texts from the settings (also: gaoo_link_activate_text, gaoo_popup_deactivate_text, gaoo_popup_activate_text) add_filter( 'gaoo_link_deactivate_text', 'my_link_text', 10, 1 ); function my_link_text( $text ) { // $text - The text from the settings return $text; } // The individual texts of a shortcode, block, Elementor widget or Divi module add_filter( 'gaoo_shortcode_atts', 'my_shortcode_atts', 10, 1 ); function my_shortcode_atts( $atts ) { // $atts - Array with the keys link_deactivate, link_activate, popup_deactivate, popup_activate, popup_type (alert, notice) and force_reload (yes, no). An empty value uses the settings. return $atts; } // The HTML code of the link, e.g. to add a wrapper. The class "gaoo-link" must be kept. add_filter( 'gaoo_shortcode_html', 'my_shortcode_html', 10, 4 ); function my_shortcode_html( $html, $tracking_code, $current_status, $atts ) { return '<p class="my-optout">' . $html . '</p>'; } // The status check: the page for the check of the website (default: home page) add_filter( 'gaoo_frontend_check_url', 'my_frontend_check_url', 10, 1 ); function my_frontend_check_url( $url ) { return home_url( '/privacy-policy/' ); } // The status check: whether the link was found on the privacy policy page, e.g. for page builders which store the content in their own format add_filter( 'gaoo_shortcode_found', 'my_shortcode_found', 10, 3 ); function my_shortcode_found( $found, $page_id, $page ) { // $found - true if the plugin found the link return $found || false !== strpos( (string) get_post_meta( $page_id, 'my_builder_content', true ), '[ga_optout' ); } // The status check: add own checks. They are shown in the dashboard widget, on the settings page and in the status email. add_filter( 'gaoo_status_checks', 'my_status_checks', 10, 2 ); function my_status_checks( $checks, $settings ) { $checks[] = array( 'id' => 'cookie_banner', // Optional: unique ID of the check, e.g. for the REST API. The last check with the same ID wins. 'label' => 'Cookie banner is active', // Text of the check 'checked' => is_plugin_active( 'my-cookie-banner/my-cookie-banner.php' ), // true = passed, false = failed, null = unknown 'url' => admin_url( 'plugins.php' ), // Optional: page to fix the check ); return $checks; } // After every status check (automatic or "Check now"), e.g. to send the result to another service add_action( 'gaoo_status_check_done', 'my_status_check_done', 10, 2 ); function my_status_check_done( $checks, $failed ) { // $checks - List of the checks with the keys "label" and "checked" // $failed - true if at least one check failed } // Data of the webhook, sent as JSON (format: json, slack, teams or discord) add_filter( 'gaoo_webhook_payload', 'my_webhook_payload', 10, 4 ); function my_webhook_payload( $payload, $format, $checks, $network ) { // $network - true for the webhook of the network (multisite) return $payload; } // Number of sites per page in the overview of the network (default: 50) add_filter( 'gaoo_network_per_page', function () { return 100; } ); // The status email, which is only sent if a check failed (also: gaoo_status_mail_subject, gaoo_status_mail_body) add_filter( 'gaoo_status_mail_recipients', 'my_status_mail_recipients', 10, 2 ); function my_status_mail_recipients( $recipients, $checks ) { // $recipients - Array of email addresses. An empty array sends no email. $recipients[] = 'monitoring@example.org'; return $recipients; }