Skip to content

Wordpress

datadog

The Anomify WordPress plugin sends selected performance metrics about your WordPress site to the Anomify.ai service for anomaly detection and alerting.

Additionally Anomify can integrate with certain other WordPress plugins to send metrics describing their performance to Anomify. These can be enabled on the Anomify WordPress plugin's settings page. We currently have automatic integration with the WP Statistics and WooCommerce plugins.

Metrics generated from plugins are automatically prefixed with plugin.{plugin_name}. e.g. plugin.woocommerce.

Native Metrics

  • content.comment.added.{approved|not-approved|spam}
  • content.{post_id}.deleted
  • content.{post_id}.updated
  • content.{post_type}.status.transition.{new_status}
  • login.fail
  • login.success
  • php.exception

WP Statistics

https://wordpress.org/plugins/wp-statistics/

Metrics that Anomify will collect:

  • visitor.new – number of new visitors today
  • visitor.returning – number of return visitors today
  • visitor.country.$country_code – number of visitors from country with ISO code $country_code e.g. "ca"
  • visitor.agent.$agent – number of visitors using user agent $agent e.g. "chrome"
  • visitor.device.$device – number of visitors using device type $device e.g. "desktop"
  • visitor.platform.$platform – number of visitors using platform $platform e.g. "windows"
  • exclusion.$exclusion_reason – number of requests which are excluded from visit counts due to $exclusion_reason e.g. "robot"

Metrics from this plugin are prefixed with plugin.wp-statistics, e.g. plugin.wp-statistics.visitor.new

WooCommerce

https://wordpress.org/plugins/woocommerce/

Metrics that Anomify will collect:

  • cart.added
  • cart.emptied
  • cart.updated
  • customer.created
  • customer.deleted
  • customer.password.reset
  • order.cancelled
  • order.created
  • payment.complete

Metrics from this plugin are prefixed with plugin.woocommerce, e.g. plugin.woocommerce.payment.complete

These integrations are works in progress. If you find them useful, please let us know as it will help us to prioritise further development.

You will need to obtain an API key and data URL from Anomify AI before the plugin can be enabled.

If you are a WordPress developer with your own plugin and want to send metrics from that to Anomify, install the Anomify plugin, and and use the following syntax in your own code:

do_action('anomify_increment_plugin_metric', 'my.metric.name');

Or to increment the metric by a value other than 1, e.g. 5, add an optional third parameter:

do_action('anomify_increment_plugin_metric', 'my.metric.name', 5);

The name of your plugin will be automatically prepended to the metric name so you don't need to include it in the name that you pass.

Our WordPress plugin is available from the official WordPress plugin repository: https://wordpress.org/plugins/anomify/