Audience
Staff
Overview
This article provides a step-by-step guide for setting up a new website to be monitored in PIWIK. It covers logging in with administrator access, navigating the administration panel, and creating a new website entry with essential details like name and URLs. It also explains two methods for integrating data into PIWIK: adding a tracking code to the website or importing webserver log files using a Python script. The guide ensures accurate setup and monitoring of website analytics.
Steps for Create a New Website to be Monitored.
System requirements: PIWIK Installed & user account with administrator access
- Logon to PIWIK with administrator rights.
- Locate the "Gear/Wheel" symbol on the top right hand corner of the main page and click it.
- Once at the administration page locate the "Websites" button on the left side of the page under Administration and click it.
- You will be provided a current listing of all websites that are setup to be monitored.
- Locate and click the RED button named "Add a new Measurable" and click it.
- You are provided two options "Website" or "Mobile App".
- For iTarget we are only monitoring Websites at this time. Select "Website" to continue.
- The first box that must be filled in is the Name. This is simply an identifier of the website that is being monitored. For administration and manageability use the name of the website {without} the http/https.
- Under the URLs box fill in the associated website URLs to be monitored. As of the writing of this document we are only adding the website twice once with http and once with https.
- These are the only required settings that must be filled in to setup a new website; however there are many more options.
- Click "Save" when you are finished and the newly created website will be listed. You may need to navigate to the next page(s) to see the one you just created. It will be the last one on the list.
Steps for getting your data into PIWIK for the new website.
There are two methods for getting your data into PIWIK. Use the tracking code or import the webserver log files manually.
Using the Tracking Code
- Logon to the server with administrator rights.
- Locate the "Gear/Wheel" symbol on the top right hand corner of the main page and click it.
- Once at the administration page locate the "Websites" button on the left side of the page under Administration and click it.
- Using the screen navigate to the website you just created.
- Underneath the website you will see an option to "View Tracking Code". This will display the tracking code that must be added to "Every" website page in order for PIWIK to retrieve and maintain the data. It is preferred to place this on the main page template.
- Once you have entered the Tracking Code to your website you will immediately see the data for that website.
Importing webserver log files.
- Importing webserver log files is a fairly simple process. The process scans a webserver log file for specific named fields that are associated and imports that data into the website specified in the import process.
- The PIWIK import process is a "Phython" driver process. The script is already written and only needs a couple parameters to identify; what is the PIWIK website URL, What is the website ID# {this can be found in PIWIK under the website name identifier}, The user name and password {that has access to import}, and where it is coming from {where the log files are located}.
- Here are two samples of what an import line will look like:
- import_logs.py --url=https://webanalytics.hs.pitt.edu --idsite=1 --login=import --password=piwikimport E:\WebLogs\CTSI\W3SVC5\u_ex160128.log
- import_logs.py --url=https://webanalytics.hs.pitt.edu --idsite=19 --login=import --password=piwikimport E:\WebLogs\glassfish\HSC\server_access_log.2016-01-01.txt
- This process can be run manually on any site and can take anywhere from 1-45 minutes depending on the size of the log.
- Our DBA (Dan) has created a program that can be run to automatically import all websites based on the parameters listed above. It was designed to be easily modified to suit our needs. If a site is determined that the Tracking Code will not work than this process can be used.
Feedback and Concerns:
If you have any feedback regarding this article, please reach out to hsitkb@pitt.edu. You can also leave a comment below as well.