How to add Matomo (Piwik) Analytics in AMP

Matomo, formerly Piwik, is a free and open-source web analytics application developed by a team of international developers, that runs on a PHP/MySQL webserver. It tracks online visits to one or more websites and displays reports on these visits for analysis.

Follow the below steps to add Matomo (Piwik) Analytics in AMP

Step 1 – Go to WordPress admin area -> AMP option panel -> Settings -> Analytics.

Step 2 – Matomo (Piwik) Analytics: Enable this option you need to enter the Matomo (Piwik) Analytics URL.

Step 3 – Enter Your Piwik Analytics URL: In this filed you need to enter your Piwik Analytics URL. for example:( https://YOUR_PIWIK_BASE_INSTALLATION_URL/piwik.php?idsite=1&rec=1& action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL& rand=RANDOM )

Required parameters

  • Piwik base URL (required): Here you need to enter your Piwik base installation URL.
  • idsite (required) – The ID of the website we’re tracking a visit/action for.
  • rec (required) – Required for tracking, must be set to one, eg, &rec=1.
  • action_name (recommended) -The title of the action being tracked. It is possible to use slashes / to set one or several categories for this action. For example, Help / Feedback will create the Action Feedback in the category Help
  • urlref -The full HTTP Referrer URL. This value is used to determine how someone got to your website (ie, through a website, search engine or campaign)
  • url (recommended) -The full URL for the current action.
  • rand (recommended) – Meant to hold a random value that is generated before each request. Using it helps avoid the tracking request being cached by the browser or a proxy.

For Example: 

Step 4 – Click on the “Save Changes” button and it will be displayed on your AMP pages.

If you enable this option it Can be tracked the Browser, Operating System, Time on Website/Page, Page Title, IP/Hostname.

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

 

Share
Published by
Sonali R
Article Categories: How To

How to create an AWeber form in AMP

If you want to add an AWeber form in AMP then first you need to…

3 years ago

How to setup webpushr notification in AMP

Webpushr is the fastest growing web push notifications platform that marketers love & developers rely…

3 years ago

How to add Adobe Analytics in AMP

Follow these steps to add Adobe Analytics in AMP Step 1: Go to WordPress Admin Area -> AMP…

4 years ago

What is the CWV plugin all about

Core Web Vitals are the subset of Web Vitals that apply to all web pages,…

4 years ago

How to fix “Alternate page with proper canonical tag” Page Index issue in Google Search Console

The following reasons can be shown for non-indexing. Server error (5xx) Your server returned a 500-level…

4 years ago

Google Analytics ( GA4 ) integration in AMPforWP

We have added the Google Analytics 4 ( GA 4 ) integration in AMPforWP v1.0.80.…

4 years ago