{"id":400739,"date":"2026-11-16T17:48:22","date_gmt":"2026-11-16T17:48:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/metricraven-analytics\/"},"modified":"2026-11-16T17:48:13","modified_gmt":"2026-11-16T17:48:13","slug":"metricraven","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/metricraven\/","author":23601206,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.3","tested":"7.1.4","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"MetricRaven Analytics","header_author":"MetricRaven","header_description":"Privacy-friendly, revenue-first analytics. Adds the MetricRaven tracker to every page and attributes WooCommerce orders to their traffic source.","last_updated":"2026-11-16 17:48:13","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/metricraven.com\/docs\/install-wordpress","header_author_uri":"https:\/\/metricraven.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":46,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.3":{"tag":"1.0.3","author":"metricraven","date":"2026-11-16 17:48:13","revision":3805764}},"upgrade_notice":{"1.0.3":"<p>The custom script host option is gone. Sites that used it fall back to loading the script from metricraven.com; switch to the built-in proxy to serve it from your own domain.<\/p>","1.0.1":"<p>Tested with WordPress 7.1. No settings change.<\/p>","1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3805764,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3805764,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3805764,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3805764,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3805764,"resolution":"1","location":"assets","locale":"","width":1280,"height":1240}},"screenshots":{"1":"Settings \u2192 MetricRaven."}},"plugin_section":[],"plugin_tags":[232,396,3609,521,286],"plugin_category":[36,45,54],"plugin_contributors":[293223],"plugin_business_model":[],"class_list":["post-400739","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-privacy","plugin_tags-revenue","plugin_tags-statistics","plugin_tags-woocommerce","plugin_category-analytics","plugin_category-ecommerce","plugin_category-security-and-spam-protection","plugin_contributors-metricraven","plugin_committers-metricraven"],"banners":{"banner":"https:\/\/ps.w.org\/metricraven\/assets\/banner-772x250.png?rev=3805764","banner_2x":"https:\/\/ps.w.org\/metricraven\/assets\/banner-1544x500.png?rev=3805764","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/metricraven\/assets\/icon-128x128.png?rev=3805764","icon_2x":"https:\/\/ps.w.org\/metricraven\/assets\/icon-256x256.png?rev=3805764","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/metricraven\/assets\/screenshot-1.png?rev=3805764","caption":"Settings \u2192 MetricRaven."}],"raw_content":"<!--section=description-->\n<p><a href=\"https:\/\/metricraven.com\">MetricRaven<\/a> shows where your visitors come from and which of those channels make money. This plugin adds the MetricRaven tracker to your WordPress site without editing theme files.<\/p>\n\n<ul>\n<li><strong>One field to set up.<\/strong> Paste your site ID and every front-end page is tracked.<\/li>\n<li><strong>Cookieless by default.<\/strong> Nothing is stored in the visitor's browser until your consent banner grants it. Works with the WP Consent API (Complianz, CookieYes and other compatible banners).<\/li>\n<li><strong>Excludes your own visits.<\/strong> Logged-in administrators, or any roles you pick, are not tracked.<\/li>\n<li><strong>Built-in proxy.<\/strong> Optionally serve the script and events from your own domain so fewer visits are lost to ad blockers.<\/li>\n<li><strong>WooCommerce revenue attribution.<\/strong> Saves the visitor ID on each order as hidden <code>_metricraven_visitor_id<\/code> meta, so the MetricRaven WooCommerce webhook credits revenue to the visit's source, campaign and landing page.<\/li>\n<li><strong>Content-Security-Policy friendly.<\/strong> Add a nonce with the <code>metricraven_csp_nonce<\/code> filter. Nonces that security plugins add through <code>wp_inline_script_attributes<\/code> are kept.<\/li>\n<li><strong>Lightweight.<\/strong> One deferred script, no dashboard widgets, no database tables.<\/li>\n<\/ul>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects your site to MetricRaven (https:\/\/metricraven.com), a third-party web analytics service run by MetricRaven. Nothing is loaded or sent until you enter a site ID in Settings \u2192 MetricRaven, and logged-in users with excluded roles (administrators by default) are never tracked.<\/p>\n\n<p><strong>Tracker script and analytics events.<\/strong> On every front-end page view by a tracked visitor, the visitor's browser loads <code>https:\/\/metricraven.com\/js\/script.js<\/code> (or the same file through this site in built-in proxy mode) and sends events to <code>https:\/\/metricraven.com\/api\/v1\/collect<\/code>: page views, time spent on the page, clicks on links to other sites (host and path) and any custom events or goals you add. Each event carries your site ID, the page URL (including campaign parameters such as <code>utm_source<\/code> and <code>?ref=<\/code>), the referrer and a timestamp; the request itself carries the visitor's IP address and browser user agent. MetricRaven uses the IP address to look up country and city and to derive a daily visitor ID, and does not store it. Until the visitor consents (see the Consent setting), nothing is stored in the browser; with consent, a random visitor ID is kept in a first-party cookie and localStorage for a year and sent with each event.<\/p>\n\n<p><strong>Built-in proxy mode.<\/strong> When you choose \"This WordPress site\", your server downloads <code>script.js<\/code> from MetricRaven at most once an hour (cached in a transient) and forwards each event the browser posts to <code>\/?mrp=event<\/code> to <code>https:\/\/metricraven.com\/api\/v1\/collect<\/code>, adding the visitor's IP address, user agent, origin and referrer so location and device are recorded correctly.<\/p>\n\n<p><strong>WooCommerce.<\/strong> With revenue attribution on, the plugin saves the visitor ID on each order. The plugin itself sends no order data. Order details (amount, currency, status, line items, customer email and the saved visitor ID) reach MetricRaven only if you add the MetricRaven webhook under WooCommerce \u2192 Settings \u2192 Advanced \u2192 Webhooks, which WooCommerce then delivers.<\/p>\n\n<ul>\n<li>Terms of service: https:\/\/metricraven.com\/legal\/terms<\/li>\n<li>Privacy policy: https:\/\/metricraven.com\/legal\/privacy<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>In WordPress, go to <strong>Plugins \u2192 Add New<\/strong> and search for \"MetricRaven\", or upload the plugin zip under <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong>.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to <strong>Settings \u2192 MetricRaven<\/strong>, paste your site ID (from MetricRaven \u2192 Settings \u2192 Tracking &amp; install) and save.<\/li>\n<li>Purge any page cache, open your site in a private window and check the visit appears in your MetricRaven dashboard.<\/li>\n<\/ol>\n\n<h4>WooCommerce<\/h4>\n\n<ol>\n<li>In MetricRaven, open Settings \u2192 Integrations \u2192 WooCommerce and copy the webhook URL and secret.<\/li>\n<li>In WooCommerce \u2192 Settings \u2192 Advanced \u2192 Webhooks, add a webhook for <strong>Order updated<\/strong> with that delivery URL and secret, API version 3.<\/li>\n<li>Keep <strong>Revenue attribution<\/strong> on in Settings \u2192 MetricRaven.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20use%20cookies%3F\"><h3>Does it use cookies?<\/h3><\/dt>\n<dd><p>Not by default. Until the visitor consents, MetricRaven derives a daily visitor ID on its servers and stores nothing in the browser. Choose \"Follow the WP Consent API\" or call <code>analytics.setConsent(true)<\/code> from your banner to keep a visitor ID across days.<\/p><\/dd>\n<dt id=\"how%20are%20woocommerce%20orders%20attributed%20without%20cookies%3F\"><h3>How are WooCommerce orders attributed without cookies?<\/h3><\/dt>\n<dd><p>Once the cart has items, the plugin saves the visitor ID in the WooCommerce session that the cart already uses, and the classic checkout also sends it in a hidden field. No extra cookie is set.<\/p><\/dd>\n<dt id=\"my%20own%20visits%20still%20show%20up\"><h3>My own visits still show up<\/h3><\/dt>\n<dd><p>Excluded roles only apply while you are logged in. To exclude a browser permanently, run <code>localStorage.ana_ignore = \"1\"<\/code> in its developer console.<\/p><\/dd>\n<dt id=\"a%20caching%20or%20optimization%20plugin%20broke%20tracking\"><h3>A caching or optimization plugin broke tracking<\/h3><\/dt>\n<dd><p>Plugins that combine or delay JavaScript can drop <code>data-*<\/code> attributes. Exclude <code>script.js<\/code> (or the <code>?mrp=script<\/code> URL in proxy mode) from combining and delaying.<\/p><\/dd>\n<dt id=\"can%20i%20add%20other%20tracker%20attributes%3F\"><h3>Can I add other tracker attributes?<\/h3><\/dt>\n<dd><p>Use the <code>metricraven_script_attributes<\/code> filter, for example to add <code>data-allow-localhost<\/code> on a staging site. <code>metricraven_should_track<\/code> turns tracking off for any request.<\/p><\/dd>\n<dt id=\"what%20does%20uninstalling%20remove%3F\"><h3>What does uninstalling remove?<\/h3><\/dt>\n<dd><p>Deleting the plugin removes its settings and script cache. The <code>_metricraven_visitor_id<\/code> meta stays on past orders as part of their history.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Removed the custom script host setting: the tracker loads only from metricraven.com or through this site's built-in proxy.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Security: the WooCommerce visitor ID request checks a nonce.<\/li>\n<li>Security: the built-in proxy accepts events only from this site and validates the JSON body before forwarding it.<\/li>\n<li>The proxy exits early on requests without its query variable.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Tested with WordPress 7.1.<\/li>\n<li>Translations load through WordPress.org language packs (removed the manual load_plugin_textdomain call).<\/li>\n<li>Readme: full External services disclosure.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release: tracker, role exclusion, consent modes, built-in proxy, custom host, WooCommerce attribution, CSP nonce support.<\/li>\n<\/ul>","raw_excerpt":"Privacy-friendly, revenue-first web analytics. Track every page and credit WooCommerce revenue to the channels that brought each buyer.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/400739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=400739"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/metricraven"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=400739"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=400739"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=400739"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=400739"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=400739"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=400739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}