Skip to content

Latest commit

 

History

History
74 lines (43 loc) · 4.61 KB

File metadata and controls

74 lines (43 loc) · 4.61 KB

Installation instructions for PiWik Pro

Installing Piwik Pro is straightforward. Create an account at https://piwik.pro/, add the tracking code to the theme, and be done.

1 - The Piwik Pro account

The non-paid version, called Core Plan, allows for up to 500.000 actions. An action is defined as follows:

  • Page view: a visitor visits a page
  • Download: a visitor downloads a file
  • Outlink: a visitor clicks the link to an external website
  • Search: a visitor uses your internal search engine
  • Custom event: a visitor performs a custom event
  • Goal: a visitor completes a goal
  • Loading a tag manager container
  • Loading a consent manager window
  • Uploading a line item
  • Sending an API request

Not having used this platform, I cannot attest to how they add up at the end of the month; namely how many actions represent, on average, each action. So, I have no idea for how many visitors this plan is sufficient.

2 - The account setup

After adding your site, through the Add site or app button, you'll be presented with your dashboard, with the following notice, stating that you have to install a container for your site:

Screenshot of the notice

After clicking Install now, you'll be redirected to the container settings page. These can be changed later. For now, the most important, and that will change the appearance of your site is located in the "Privacy" tab, and the first setting refers to an option to remove the consent form from the website. By default, it is turned on, which will show the consent form on your website. Its appearance can be edited through the Consent Manager section.

Screenshot of the privacy tab

The last tab is Installation and you are presented with several pre-configured configurations for different platforms and technologies. In the case of AtoM, choose Install manually

Screenshot of the Installation tab

When opening the Install manually configuration, a piece of code is presented to be copied and pasted into your site. Copy it and place it in the AtoM theme (see below - 3).

Screenshot of the code to install

Finally, an option to check if everything is correctly installed is presented at the bottom, the Tracker debugger, through which you can verify if all went well.

Screenshot of the code to install

3 - Placing the code in AtoM's site

Now, you can take the code you copied earlier (or go back to the dashboard settings to get it), and place it in the _footer.php file of your theme.
If you don't have a theme setup, AtoM's default theme is arDominionPlugin, located in the plugins folder of your AtoM installation. Now, ideally, you should create a new theme, based on the arDominionPlugin and make the changes there (see https://accesstomemory.org/en/docs/2.7/admin-manual/customization/theming/#customization-theming on how to create it), or you can change the theme directly (note that it will probably be overridden when you update Atom, so track the changes you make).

The _footer.php file
You may have noticed, if you've been following the instructions and making the changes at the same time, that there is no _footer.php file in the plugin folder. That's because any custom plugins, in Symfony (the framework on what AtoM is built on) can override existing files. In the case of AtoM, the file needed to be overridden is located at /apps/qubit/templates/_footer.php.

Screenshot of installation folder location

This means you have to recreate the path in the plugin, by creating a new folder called templates and a file, _footer.php, inside.

Screenshot of the folder and file to create

After that, copy the original file's content (the one from /app/qubit/_footer.php), and add, at the top, right below the <footer> tag, the code from the Piwik dashboard setup.

Screenshot of the code to add

Everything should be set up now, and you can check it on the Tracker debugger page.

4 - Removing ourselves from the counts

I'm not absolutely sure if, and how, is possible to remove the site's internal users from the total count of hits through the Piwik administration, but, to prevent logged in users or administrators of the AtoM instance from being counted, you can add checks to the code, like this:

Removing Administrators

Screenshot of the code to change to remove admins

Removing authenticated users

Screenshot of the code to change to logged in users