<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Analytics Archives - jiaa.io Blog</title>
	<atom:link href="https://blog.jiaa.io/category/analytics/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.jiaa.io/category/analytics/</link>
	<description>Digital madness and beyond</description>
	<lastBuildDate>Thu, 13 Jul 2023 08:38:13 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.jiaa.io/wp-content/uploads/2017/01/cropped-favicon-2-150x150.png</url>
	<title>Analytics Archives - jiaa.io Blog</title>
	<link>https://blog.jiaa.io/category/analytics/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</title>
		<link>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/</link>
					<comments>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/#comments</comments>
		
		<dc:creator><![CDATA[michael_goldbeck]]></dc:creator>
		<pubDate>Sun, 05 Feb 2017 15:40:52 +0000</pubDate>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://blog.jiaa.io/?p=172</guid>

					<description><![CDATA[<p>Even-though I&#8217;ve been a Web-Designer and Web-Developer for a couple of years, starting out new projects has always been challenging. Which technology stack should I use, which requirements should I tackle first and how the heck should I finish this interface? This. Happens. Every. Single. Time.  So I started learning from data. As misleading data driven design [&#8230;]</p>
<p>The post <a href="https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/">How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Even-though I&#8217;ve been a Web-Designer and Web-Developer for a couple of years, starting out new projects has always been challenging. Which technology stack should I use, which requirements should I tackle first and how the heck should I finish this interface?</p>
<p><strong>This. Happens. Every. Single. Time. </strong></p>
<p>So I started learning from data. As <a href="https://www.fastcodesign.com/1662273/google-equates-design-with-endless-testing-theyre-wrong" target="_blank" rel="noopener">misleading</a> data driven design can be, it gives one a heck of a fast start. That&#8217;s why I analyse my personal pages as well &#8211; I want to make them better by improving gradually. <em>But which tool should I use?  </em>On first sight services such as Google Analytics seem like a great deal: easy to implement, easy to use as well as extensive &#8211; and above all &#8222;<a href="https://moz.com/ugc/is-google-analytics-hurting-your-business" target="_blank" rel="noopener"><em>free</em></a>&#8222;. But it does come at a heavy price &#8211; your users privacy.</p>
<p><span id="more-172"></span></p>
<p><strong>Open source to the rescue! </strong></p>
<p><a href="https://piwik.org/" target="_blank" rel="noopener">Piwik</a> is an open source analytics platform you can host yourself. You have full ownership &amp; control over the collected data; so no snooping around from corporations at least. For this <strong>tutorial</strong> I chose <a href="https://m.do.co/c/f092253c77b4" target="_blank" rel="noopener">DigitalOcean</a> as the host &#8211; a <a href="http://searchcloudcomputing.techtarget.com/definition/cloud-infrastructure" target="_blank" rel="noopener">cloud infrastructure</a> provider where I have most of my <a href="https://en.wikipedia.org/wiki/Virtual_machine" target="_blank" rel="noopener">virtual machines</a>.</p>
<p><strong>Step 1:</strong> Starting a droplet</p>
<p><img fetchpriority="high" decoding="async" class="size-large wp-image-182 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/digitalocean-choose-droplet-672x1024.jpg" alt="" width="672" height="1024" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-672x1024.jpg 672w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-197x300.jpg 197w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-768x1170.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-1009x1536.jpg 1009w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-1345x2048.jpg 1345w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-800x1218.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet.jpg 1400w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<p>Choosing the right droplet for this project almost couldn&#8217;t be simpler: the host operating system of this machine is going to be <a href="http://releases.ubuntu.com/16.04/" target="_blank" rel="noopener">Ubuntu 16.04</a>, with the smallest size available. 512mb of <a href="https://en.wikipedia.org/wiki/Random-access_memory" target="_blank" rel="noopener">RAM</a> might not be enough for a lot of sites, but as this is only a test it&#8217;s plenty. I also like to have things around Europe &#8211; so I chose <a href="https://en.wikipedia.org/wiki/Frankfurt" target="_blank" rel="noopener">Frankfurt</a>, Germany as the datacenter region. Don&#8217;t overlook that &#8222;<em>One-click apps</em>&#8220; tab on top &#8211; there&#8217;s a lot of open source awesomeness in there! In order to save us some server setup hassle, I went for the &#8222;<em>LAMP 16.04</em>&#8220; image provided by <a href="https://m.do.co/c/f092253c77b4" target="_blank" rel="noopener">DigitalOcean</a>. It comes with a properly set up firewall and some security best-practices per default &#8211; <em>kudos to that DigitalOcean</em>! Hitting the &#8222;<em>create</em>&#8220; button will do everything we need.</p>
<p>&nbsp;</p>
<p><strong>Step 2:</strong> Server Setup</p>
<p>So the droplet is up and running &#8211; let&#8217;s give it a purpose. First you&#8217;ll want to log into the machine. Being a <a href="https://en.wikipedia.org/wiki/Terminal_(macOS)" target="_blank" rel="noopener">terminal</a> kind of guy I&#8217;ll do just that &#8211; but you can use <a href="http://www.putty.org/" target="_blank" rel="noopener">PuTTY</a> or anything else as well if you want to.</p>
<p><code>ssh root@YOUR_IP_ADDRESS</code></p>
<p>If you have set up your droplet without a SSH key, then you have an email with the login credentials in your inbox. <strong>But be aware:</strong> using SSH keys to login on servers is way more convenient and secure. DigitalOcean has a nice <a href="https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets" target="_blank" rel="noopener">tutorial</a> to do that. After login you&#8217;ll be greeted with a lot of info:</p>
<p><img decoding="async" class="size-full wp-image-190 aligncenter" src="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login.jpg" alt="" width="995" height="729" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login.jpg 995w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-300x220.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-768x563.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-800x586.jpg 800w" sizes="(max-width: 995px) 100vw, 995px" /></p>
<p>The first thing to do is to update the system:</p>
<p><code>apt update</code></p>
<p>and</p>
<p><code>apt upgrade</code></p>
<p>will do the trick. But only keeping the system up to date will not help you being reasonably secure &#8211; follow <a href="https://www.digitalocean.com/community/tutorials/7-security-measures-to-protect-your-servers" target="_blank" rel="noopener">this tutorial</a> to secure your droplet right from the beginning. <em>Especially changing to a non-root user is a smart move</em>.</p>
<p><strong><em>You&#8217;re doing great so far</em> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p>
<p>&nbsp;</p>
<p><strong>Step 3: </strong>Setting up <a href="https://letsencrypt.org/" target="_blank" rel="noopener">Let&#8217;s Encrypt</a> certificates</p>
<p>I did a lot of complaining in <a href="https://blog.jiaa.io/2017/01/28/shopping-e-commerce-auf-osterreichisch/" target="_blank" rel="noopener">my last post</a>, that <a href="https://www.shoepping.at/" target="_blank" rel="noopener">shöpping.at</a> &#8211; the new online market for Austrian goods &#8211; hasn&#8217;t set up <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noopener">SSL</a> certificates properly (they have <em>now</em>). So <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04" target="_blank" rel="noopener">here&#8217;s a quick one how to do so</a>. Because Digital Ocean droplets with LAMP come with everything needed pre-installed, it&#8217;s as simple as:</p>
<p><code>sudo letsencrypt --apache -d yourdomain.org</code></p>
<p>To renew your certificate you simply do:</p>
<p><code>sudo letsencrypt renew</code></p>
<p>To set up auto-renewal you can follow <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04" target="_blank" rel="noopener">this tutorial</a>.</p>
<p>&nbsp;</p>
<p><strong>Step 4: </strong>Setting up PIWIK</p>
<p>In order to install PIWIK on our Ubuntu 16.04 droplet, we have to change to the <em>www</em> folder:<br />
<code>cd /var/www</code></p>
<p>There we download the latest PIWIK build and unzip afterwards:<br />
<code>wget https://builds.piwik.org/latest.zip</code><br />
<code>unzip latest.zip</code></p>
<p>Then we transfer all files from the <em>PIWIK</em> folder to the <em>html</em> folder and setup the rights properly:<br />
<code>mv piwik/. html/</code><br />
<code>chown -R www-data:www-data /var/www/html</code></p>
<p>If you hit the IP of your server in your browser you should get this.</p>
<p><img decoding="async" class="aligncenter wp-image-198 size-large" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-welcome-screen-e1486307418935-1024x383.jpg" width="672" height="251" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-1024x383.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-300x112.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-768x288.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-800x299.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935.jpg 1373w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<p>Well, the first battle seems to be won! So let&#8217;s configure it. Hit the <strong>next button</strong>.</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-200 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-setup-step2-1024x648.jpg" alt="" width="672" height="425" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-1024x648.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-300x190.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-768x486.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-800x506.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2.jpg 1227w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p>And there it is &#8211; a missing PHP extension appeared! Almost as easy as catching a Pokèmon this error can be fixed:</p>
<p><code>sudo apt install php7.0-mbstring</code></p>
<p><em>Take that, Magikarp of PHP. </em></p>
<p>&nbsp;</p>
<p><strong>Step 4: </strong>Setting up a database</p>
<p>The next step leads us to the database credentials. If you read the server login message carefully, you know the password of the MySQL root-User can be found with:<br />
<code>nano /root/.digitalocean_password</code></p>
<p>So we have the database server (127.0.0.1), the username (root) and the password. But we lack the database name, because we haven&#8217;t set up a database so far. So let&#8217;s do just that:<br />
<code>mysql -u root -p</code><br />
<code>CREATE DATABASE databaseName;</code></p>
<p><strong>We&#8217;re almost there.</strong></p>
<p>Enter your data in the database form in your browser and hit the next button. After a success-message telling you your tables were created, hit next again. Then you can add a super admin user &#8211; be smart and add a safe password!</p>
<p><em>Just a little further</em> &#8211; enter some details about the website you want to start to analyse and hit next. Then you&#8217;ll be provided with the code that needs to be included on all sites of your website. If you user a CMS such as WordPress, you can use a <a href="https://wordpress.org/plugins/wp-piwik/" target="_blank" rel="noopener">plugin</a> to achieve that.</p>
<p><strong>And there you go:</strong></p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-203 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-successfully-installed-1024x705.jpg" alt="" width="672" height="463" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-1024x705.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-300x207.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-768x529.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-800x551.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed.jpg 1245w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p><strong>Now, wasn&#8217;t that easy? </strong></p>
<p>As enjoyable as this his been, you&#8217;re not done yet. Learn how the thing works, <a href="https://www.rackaid.com/blog/server-security-tips/" target="_blank" rel="noopener">secure your server</a> properly and give hands up to the guys over at <a href="https://piwik.org/" target="_blank" rel="noopener">PIWIK</a> and <a href="https://letsencrypt.org" target="_blank" rel="noopener">Let&#8217;s Encrypt</a> for providing you with all of this for free!</p>
<p><em>Image from <a href="https://stocksnap.io/photo/VFQGMU3RL9" target="_blank" rel="noopener">stocksnap.io</a>, CC0 License.</em></p>
<p>The post <a href="https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/">How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
