matomo corrections
This commit is contained in:
parent
e10ddb1a11
commit
957c1ba753
|
|
@ -3,25 +3,23 @@
|
|||
echo -e "${PURPLE}${BOLD}Add a new website to track from the Matomo interface as an admin user${RESET}"
|
||||
echo -e "${PURPLE}${BOLD}All website → Add a new Website → Website${RESET}"
|
||||
echo -e "${PURPLE}${BOLD}Fill in the following informations :${RESET}"
|
||||
echo -e "${BLUE}${BOLD}Website name :${RESET}${BLUE}${DOMAIN_NAME}${RESET}"
|
||||
echo -e "${BLUE}${BOLD}Urls :${RESET}${BLUE}https://${DOMAIN_NAME}/${RESET}"
|
||||
echo -e "${BLUE}${BOLD}Website name : ${RESET}${BLUE}${DOMAIN_NAME}${RESET}"
|
||||
echo -e "${BLUE}${BOLD}Urls : ${RESET}${BLUE}https://${DOMAIN_NAME}/${RESET}"
|
||||
echo -e "${PURPLE}${BOLD}Enter the Matomo instance URL :${RESET}${PURPLE} ie : matomo.example.com${RESET}"
|
||||
read -s matomo_url
|
||||
read matomo_url
|
||||
echo -e "${PURPLE}${BOLD}Find the website ID at the following URL${RESET}"
|
||||
echo -e "${PURPLE}https://${matomo_url}/index.php?module=SitesManager${RESET}"
|
||||
echo -e "${BLUE}https://${matomo_url}/index.php?module=SitesManager${RESET}"
|
||||
echo -e "${PURPLE}${BOLD}Enter the Website ID :${RESET}"
|
||||
read -s matomo_website_id
|
||||
read matomo_website_id
|
||||
|
||||
get_username
|
||||
|
||||
temp_matomo_script = /home/$username/matomo.html
|
||||
index_file = /var/www/html/public/index.html
|
||||
temp_matomo_script=/home/$username/matomo.html
|
||||
index_file=/var/www/html/public/index.html
|
||||
|
||||
cp assets/matomo.html $temp_matomo_script
|
||||
|
||||
sed -i "s/var matomoSiteId = '';/var matomoSiteId = '$matomo_website_id';/g" $temp_matomo_script
|
||||
sed -i "s/var matomoInstanceUrl = '';/var matomoInstanceUrl = '$matomo_url';/g" $temp_matomo_script
|
||||
|
||||
sed -i '/<\/head>/i\'"$(cat $temp_matomo_script)"'' $index_file
|
||||
|
||||
rm $temp_matomo_script
|
||||
sed -i '/<\/head>/i\'"$(cat $temp_matomo_script)"'' $index_file
|
||||
Loading…
Reference in New Issue