{"id":473,"date":"2023-10-21T15:27:24","date_gmt":"2023-10-21T15:27:24","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=473"},"modified":"2023-10-21T15:27:25","modified_gmt":"2023-10-21T15:27:25","slug":"matomo","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/matomo\/","title":{"rendered":"Matomo Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Matomo Shortcodes<\/strong> to your WordPress website, including their <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Matomo Plugin shortcodes not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Matomo Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/matomo\/assets\/icon-128x128.png?rev=2309115\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/matomo\" target=\"_blank\" rel=\"noopener\">\n                        Matomo Analytics &#8211; Ethical Stats. Powerful Insights.                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Matomo Analytics &#8211; Ethical Stats. Powerful Insights. is a WordPress plugin that offers ethical, privacy-friendly site analysis. It provides powerful insights to optimize your website&#039;s performance.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2729<\/span> (135)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 80000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.2.3            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 7.2.5            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[matomo_opt_out]<\/li><li>[matomo_privacy_badge]<\/li><li>[matomo_report]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Matomo [matomo_opt_out] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Matomo Opt-Out shortcode allows users to opt out of tracking. It checks the &#8216;DoNotTrack&#8217; header and if enabled, displays a message. If not, it enqueues a script for opt-out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[matomo_opt_out]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible matomo_opt_out shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>language<\/code> &#8211; Sets the language for the opt-out message displayed to users<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A basic usage of the Matomo Opt-Out shortcode without any parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_opt_out \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Using the shortcode with a language parameter. This will display the opt-out form in the specified language, if available.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_opt_out language=\"en\" \/]<\/code><\/pre>\n\n\n<p>Using the shortcode with an unsupported language. The opt-out form will default to English if the specified language is not supported or incorrect.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_opt_out language=\"xyz\" \/]<\/code><\/pre>\n\n\n<p>Note: The &#8216;language&#8217; attribute accepts ISO 639-1 language codes. For example, &#8216;en&#8217; for English, &#8216;de&#8217; for German, &#8216;fr&#8217; for French, etc. If the language code is incorrect or not supported, the opt-out form will default to English.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[matomo_opt_out]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'matomo_opt_out', array( $this, 'show_opt_out' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction show_opt_out( $atts ) {\n\t\t$a = shortcode_atts(\n\t\t\t&#91;\n\t\t\t\t&#039;language&#039; =&gt; null,\n\t\t\t],\n\t\t\t$atts\n\t\t);\n\t\tif ( ! empty( $a&#91;&#039;language&#039;] ) &amp;&amp; strlen( $a&#91;&#039;language&#039;] ) &lt; 6 ) {\n\t\t\t$this-&gt;language = $a&#91;&#039;language&#039;];\n\t\t}\n\n\t\ttry {\n\t\t\tBootstrap::do_bootstrap();\n\t\t} catch ( Throwable $e ) {\n\t\t\t$logger = new Logger();\n\t\t\t$logger-&gt;log_exception( &#039;optout&#039;, $e );\n\n\t\t\treturn &#039;&lt;p&gt;An error occurred. Please check Matomo system report in WP-Admin.&lt;\/p&gt;&#039;;\n\t\t}\n\n\t\t$dnt_checker = new DoNotTrackHeaderChecker();\n\t\t$dnt_enabled = $dnt_checker-&gt;isDoNotTrackFound();\n\n\t\tif ( ! empty( $dnt_enabled ) ) {\n\t\t\treturn &#039;&lt;p&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_OptOutDntFound&#039; ) . &#039;&lt;\/p&gt;&#039;;\n\t\t}\n\n\t\twp_enqueue_script( &#039;matomo_opt_out_js&#039; );\n\n\t\t$track_visits = empty( $_COOKIE&#91;&#039;mtm_consent_removed&#039;] );\n\n\t\t$style_tracking_enabled  = &#039;&#039;;\n\t\t$style_tracking_disabled = &#039;&#039;;\n\t\t$checkbox_attr           = &#039;&#039;;\n\t\tif ( $track_visits ) {\n\t\t\t$style_tracking_enabled = &#039;style=&quot;display:none;&quot;&#039;;\n\t\t\t$checkbox_attr          = &#039;checked=&quot;checked&quot;&#039;;\n\t\t} else {\n\t\t\t$style_tracking_disabled = &#039;style=&quot;display:none;&quot;&#039;;\n\t\t}\n\n\t\t$content  = &#039;&lt;p id=&quot;matomo_opted_out_intro&quot; &#039; . $style_tracking_enabled . &#039;&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_OptOutComplete&#039; ) . &#039; &#039; . $this-&gt;translate( &#039;CoreAdminHome_OptOutCompleteBis&#039; ) . &#039;&lt;\/p&gt;&#039;;\n\t\t$content .= &#039;&lt;p id=&quot;matomo_opted_in_intro&quot; &#039; . $style_tracking_disabled . &#039;&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_YouMayOptOut2&#039; ) . &#039; &#039; . $this-&gt;translate( &#039;CoreAdminHome_YouMayOptOut3&#039; ) . &#039;&lt;\/p&gt;&#039;;\n\n\t\t$content .= &#039;&lt;form&gt;\n        &lt;input type=&quot;checkbox&quot; id=&quot;matomo_optout_checkbox&quot; &#039; . $checkbox_attr . &#039;\/&gt;\n        &lt;label for=&quot;matomo_optout_checkbox&quot;&gt;&lt;strong&gt;\n        &lt;span id=&quot;matomo_opted_in_label&quot; &#039; . $style_tracking_disabled . &#039;&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_YouAreNotOptedOut&#039; ) . &#039; &#039; . $this-&gt;translate( &#039;CoreAdminHome_UncheckToOptOut&#039; ) . &#039;&lt;\/span&gt;\n\t\t&lt;span id=&quot;matomo_opted_out_label&quot; &#039; . $style_tracking_enabled . &#039;&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_YouAreOptedOut&#039; ) . &#039; &#039; . $this-&gt;translate( &#039;CoreAdminHome_CheckToOptIn&#039; ) . &#039;&lt;\/span&gt;\n        &lt;\/strong&gt;&lt;\/label&gt;&lt;\/form&gt;&#039;;\n\t\t$content .= &#039;&lt;noscript&gt;&lt;p&gt;&lt;strong style=&quot;color: #ff0000;&quot;&gt;This opt out feature requires JavaScript.&lt;\/strong&gt;&lt;\/p&gt;&lt;\/noscript&gt;&#039;;\n\t\t$content .= &#039;&lt;p id=&quot;matomo_outout_err_cookies&quot; style=&quot;display: none;&quot;&gt;&lt;strong&gt;&#039; . $this-&gt;translate( &#039;CoreAdminHome_OptOutErrorNoCookies&#039; ) . &#039;&lt;\/strong&gt;&lt;\/p&gt;&#039;;\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">matomo\/matomo\/classes\/WpMatomo\/OptOut.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Matomo [matomo_privacy_badge] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Matomo Privacy Badge shortcode is used to display a privacy badge on your website. It allows customization of size and alignment.\n\n\n\nThe shortcode generates an image tag with the privacy badge, sourced from the plugin&#8217;s assets. The width, height, and alignment of the image can be customized using the shortcode attributes &#8216;size&#8217; and &#8216;align&#8217;. The image displays a message: &#8220;Your privacy protected! This website uses Matomo.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[matomo_privacy_badge]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible matomo_privacy_badge shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>size<\/code> &#8211; sets the width and height of the privacy badge image<\/li>\n<li><code>align<\/code> &#8211; adjusts the alignment of the privacy badge image<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A simple usage of the Matomo Privacy Badge shortcode to display the privacy badge with default size and alignment.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_privacy_badge \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Modifying the size of the Matomo Privacy Badge by using the &#8216;size&#8217; attribute. This will display a larger privacy badge with a size of 150 instead of the default size of 120.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_privacy_badge size=150 \/]<\/code><\/pre>\n\n\n<p>Aligning the Matomo Privacy Badge to the right side of the page by using the &#8216;align&#8217; attribute. This will display the privacy badge aligned to the right.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_privacy_badge align=\"right\" \/]<\/code><\/pre>\n\n\n<p>Combining both &#8216;size&#8217; and &#8216;align&#8217; attributes to display a larger privacy badge aligned to the right side of the page.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_privacy_badge size=150 align=\"right\" \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[matomo_privacy_badge]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'matomo_privacy_badge', [ $this, 'show_privacy_page' ] );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction show_privacy_page( $atts ) {\n\t\t$a = shortcode_atts(\n\t\t\t&#91;\n\t\t\t\t&#039;size&#039;  =&gt; &#039;120&#039;,\n\t\t\t\t&#039;align&#039; =&gt; &#039;&#039;,\n\t\t\t],\n\t\t\t$atts\n\t\t);\n\n\t\t$option = sprintf( &#039; width=&quot;%s&quot; height=&quot;%s&quot;&#039;, esc_attr( $a&#91;&#039;size&#039;] ), esc_attr( $a&#91;&#039;size&#039;] ) );\n\n\t\tif ( ! empty( $a&#91;&#039;align&#039;] ) ) {\n\t\t\t$option .= sprintf( &#039; align=&quot;%s&quot;&#039;, esc_attr( $a&#91;&#039;align&#039;] ) );\n\t\t}\n\n\t\t$url = plugins_url( &#039;assets\/img\/privacybadge.png&#039;, MATOMO_ANALYTICS_FILE );\n\n\t\t$title = __( &#039;Your privacy protected! This website uses Matomo.&#039;, &#039;matomo&#039; );\n\n\t\treturn sprintf( &#039;&lt;img alt=&quot;%s&quot; src=&quot;%s&quot; %s&gt;&#039;, $title, esc_attr( $url ), $option );\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">matomo\/matomo\/classes\/WpMatomo\/PrivacyBadge.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Matomo [matomo_report] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Matomo Report shortcode is a powerful tool for displaying custom reports. It fetches data based on the unique_id, report_date, and limit attributes. \n\n\n\nThe shortcode checks user permissions, identifies the report period, and adjusts the limit for &#8216;visits_over_time&#8217; reports. It then fetches the relevant report data and displays it in a table format. If no data is found, it displays a &#8216;no data&#8217; message.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[matomo_report]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible matomo_report shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>unique_id<\/code> &#8211; Identifier for the specific report type<\/li>\n<li><code>report_date<\/code> &#8211; Date for the report, default is yesterday&#8217;s date<\/li>\n<li><code>limit<\/code> &#8211; Maximum number of results to display, default is 10<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Display a Matomo report with the default parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_report unique_id=\"visits_over_time\" \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Display a Matomo report for a specific date, instead of the default &#8216;yesterday&#8217;.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_report unique_id=\"visits_over_time\" report_date=\"2020-12-25\" \/]<\/code><\/pre>\n\n\n<p>Display a Matomo report with a specified limit of data points, instead of the default limit of 10.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_report unique_id=\"visits_over_time\" limit=20 \/]<\/code><\/pre>\n\n\n<p>Display a Matomo report for a specific date with a specified limit of data points.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[matomo_report unique_id=\"visits_over_time\" report_date=\"2020-12-25\" limit=20 \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[matomo_report]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'matomo_report', [ $this, 'show_report' ] );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction show_report( $atts ) {\n\t\t$a = shortcode_atts(\n\t\t\t&#91;\n\t\t\t\t&#039;unique_id&#039;   =&gt; &#039;&#039;,\n\t\t\t\t&#039;report_date&#039; =&gt; Dates::YESTERDAY,\n\t\t\t\t&#039;limit&#039;       =&gt; 10,\n\t\t\t],\n\t\t\t$atts\n\t\t);\n\n\t\t$cannot_view = $this-&gt;check_cannot_view();\n\t\tif ( $cannot_view ) {\n\t\t\treturn $cannot_view;\n\t\t}\n\n\t\t$dates                 = new Dates();\n\t\tlist( $period, $date ) = $dates-&gt;detect_period_and_date( $a&#91;&#039;report_date&#039;] );\n\n\t\tif ( &#039;visits_over_time&#039; === $a&#91;&#039;unique_id&#039;] ) {\n\t\t\t$is_default_limit = 10 === $a&#91;&#039;limit&#039;];\n\t\t\tif ( $is_default_limit ) {\n\t\t\t\t$a&#91;&#039;limit&#039;] = 14;\n\t\t\t}\n\n\t\t\treturn $this-&gt;show_visits_over_time( $a&#91;&#039;limit&#039;], $period );\n\t\t}\n\n\t\t$metadata    = new Metadata();\n\t\t$report_meta = $metadata-&gt;find_report_by_unique_id( $a&#91;&#039;unique_id&#039;] );\n\n\t\tif ( empty( $report_meta ) ) {\n\t\t\treturn sprintf( esc_html__( &#039;Report %s not found&#039;, &#039;matomo&#039; ), esc_html( $a&#91;&#039;unique_id&#039;] ) );\n\t\t}\n\n\t\t$metric_keys               = array_keys( $report_meta&#91;&#039;metrics&#039;] );\n\t\t$first_metric_name         = reset( $metric_keys );\n\t\t$first_metric_display_name = reset( $report_meta&#91;&#039;metrics&#039;] );\n\n\t\t$report_data     = new Data();\n\t\t$report          = $report_data-&gt;fetch_report( $report_meta, $period, $date, $first_metric_name, $a&#91;&#039;limit&#039;] );\n\t\t$has_report_data = ! empty( $report&#91;&#039;reportData&#039;] ) &amp;&amp; $report&#91;&#039;reportData&#039;]-&gt;getRowsCount();\n\n\t\tob_start();\n\n\t\tif ( ! $has_report_data ) {\n\t\t\tinclude &#039;views\/table_no_data.php&#039;;\n\t\t} elseif ( empty( $report_meta&#91;&#039;dimension&#039;] ) ) {\n\t\t\tinclude &#039;views\/table_no_dimension.php&#039;;\n\t\t} else {\n\t\t\tinclude &#039;views\/table.php&#039;;\n\t\t}\n\n\t\treturn ob_get_clean();\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">matomo\/matomo\/classes\/WpMatomo\/Report\/Renderer.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Matomo Plugin shortcodes<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Matomo Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Matomo Plugin shortcodes not to show or not to work correctly. Before starting, here is an overview of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Matomo Analytics &#8211; Ethical Stats. Powerful Insights.","slug":"","version":"4.15.2","author":"<a href=\"https:\/\/matomo.org\">Matomo<\/a>","icons":"https:\/\/ps.w.org\/matomo\/assets\/icon-128x128.png?rev=2309115","plugin_tags":"{\"analytics\":\"analytics\",\"matomo\":\"matomo\",\"piwik\":\"piwik\",\"statistics\":\"statistics\",\"stats\":\"stats\"}","author_profile":"https:\/\/profiles.wordpress.org\/matomoteam\/","requires":"4.8","tested":"6.2.3","requires_php":"7.2.5","rating":90,"num_ratings":135,"active_installs":80000,"downloaded":1048272,"last_updated":"2023-10-02 3:55am GMT","added":"2020-02-13","homepage":"","short_description":"Matomo is the #1 Google Analytics alternative that gives you full control over your data and protects user privacy. Free, secure, and open.","description":"\"Matomo Analytics - Ethical Stats. Powerful Insights. is a WordPress plugin that offers ethical, privacy-friendly site analysis. It provides powerful insights to optimize your website's performance.\"","shortcodes":"[\"matomo_opt_out\",\"matomo_privacy_badge\",\"matomo_report\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-473","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=473"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/473\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/473\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}