<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Analytics on Spoon</title><link>https://hugo-theme-spoon.vercel.app/tags/analytics/</link><description>Recent content in Analytics on Spoon created by</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>noneback@example.com (NoneBack)</managingEditor><webMaster>noneback@example.com (NoneBack)</webMaster><copyright>2024 NoneBack All rights reserved</copyright><lastBuildDate>Sun, 14 Aug 2022 21:34:36 +0800</lastBuildDate><atom:link href="https://hugo-theme-spoon.vercel.app/tags/analytics/index.xml" rel="self" type="application/rss+xml"/><item><title>How to integrate umami to your website for free</title><link>https://hugo-theme-spoon.vercel.app/blog/how-to-integrate-umami-for-free-to-blog-site/</link><pubDate>Sun, 14 Aug 2022 21:34:36 +0800</pubDate><author>noneback@example.com (NoneBack)</author><guid>https://hugo-theme-spoon.vercel.app/blog/how-to-integrate-umami-for-free-to-blog-site/</guid><description>&lt;p&gt;This article is about how to integrate &lt;a href="https://umami.is/"&gt;umami&lt;/a&gt; website analytics to your website for free. The database use &lt;a href="https://supabase.com/docs/guides/database"&gt;postgres&lt;/a&gt; with 500M storage limit provided by &lt;a href="https://app.supabase.com/"&gt;supabase&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://umami.is/"&gt;umami&lt;/a&gt; service is hosted with &lt;a href="https://vercel.com/"&gt;vercel&lt;/a&gt;. Thanks to the excellent service capabilities of cloud vendors, you can integrate &lt;em&gt;umami&lt;/em&gt; in less than 10 minutes. You can see the umami dashboard by clicking the &lt;a href="https://umami-ochre-nu.vercel.app/share/o3zAba1V/guangzhengli"&gt;Dashboard&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="create-a-database"&gt;Create a database&lt;/h2&gt;
&lt;p&gt;The database use &lt;a href="https://supabase.com/docs/guides/database"&gt;postgres&lt;/a&gt; with 500M storage limit provided by &lt;a href="https://app.supabase.com/"&gt;supabase&lt;/a&gt;. You can create a supabase account, click &lt;code&gt;new project&lt;/code&gt;, and enter the database passowrd to create an ProgresSQL database service.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://cdn.jsdelivr.net/gh/guangzhengli/PicURL@master/uPic/cN3Zg4.png" alt="cN3Zg4" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;It will take a few minutes to create the database service, and you can get the &lt;code&gt;DATABASE_URL&lt;/code&gt; after it&amp;rsquo;s done.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://cdn.jsdelivr.net/gh/guangzhengli/PicURL@master/uPic/image-20220815182141638.png" alt="image-20220815182141638" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="hosting-umami"&gt;Hosting umami&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://umami.is/"&gt;umami&lt;/a&gt; service is hosted with &lt;a href="https://vercel.com/"&gt;vercel&lt;/a&gt;, Once you have created the database instance, you can deploy the umami service with click deploy button in the &lt;a href="https://umami.is/docs/running-on-vercel"&gt;Running on Vercel&lt;/a&gt; document.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Fork the &lt;a href="https://github.com/mikecao/umami"&gt;https://github.com/mikecao/umami&lt;/a&gt; project to your GitHub account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create an account on Vercel.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the dashboard page click Import Project then specify the URL to your fork of the project on GitHub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the required environment variables to your Vercel project. These values are defined in the Configure umami step from Install.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;DATABASE_URL: Connection string for your database. This is the only required variable.&lt;/li&gt;
&lt;li&gt;TRACKER_SCRIPT_NAME: Allows you to assign a custom name to the tracker script different from the default &lt;code&gt;umami&lt;/code&gt;. This is to help you avoid some ad-blockers. I used &lt;code&gt;hugo-ladder&lt;/code&gt; on this project.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter &lt;code&gt;yarn build &amp;amp;&amp;amp; yarn update-db&lt;/code&gt; to the &lt;code&gt;BUILD COMMAND&lt;/code&gt;, which will migrate the tables of umami to database automatically.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy and visit your application at &lt;deploy-id&gt;.vercel.app.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Follow the Getting started guide starting from the Login step and be sure to change the default password.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="https://cdn.jsdelivr.net/gh/guangzhengli/PicURL@master/uPic/gePzXI.png" alt="gePzXI" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Of course, if you want to import tables yourself, you can also get the tables from here &lt;a href="https://github.com/umami-software/umami/blob/master/sql/schema.postgresql.sql"&gt;https://github.com/umami-software/umami/blob/master/sql/schema.postgresql.sql&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="umami-configuration"&gt;umami configuration&lt;/h2&gt;
&lt;p&gt;After deploying umami in vercel you will get a &lt;code&gt;&amp;lt;deploy-id&amp;gt;.vercel.app&lt;/code&gt; address which login with the default account: &lt;em&gt;admin&lt;/em&gt; and password: &lt;em&gt;umami&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You can change the default password and &lt;code&gt;Add webiste&lt;/code&gt;, enter the &lt;code&gt;Name&lt;/code&gt; and &lt;code&gt;Domain&lt;/code&gt;, and click &lt;code&gt;enable share URL&lt;/code&gt; so that anyone can access the dashboard.&lt;/p&gt;
&lt;p&gt;Then you can get &lt;code&gt;data-website-id&lt;/code&gt; and &lt;code&gt;src&lt;/code&gt; values by click &lt;code&gt;Get tracking code&lt;/code&gt;，enter the value to the &lt;code&gt;hugo-ladder&lt;/code&gt; configuration &lt;code&gt;params.analytics.umami.website_id&lt;/code&gt; , &lt;code&gt;params.analytics.umami.url&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://cdn.jsdelivr.net/gh/guangzhengli/PicURL@master/uPic/OZcU7U.png" alt="OZcU7U" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;In the end, you can get the website statistics analytics dashboard.🎉🎉🎉&lt;/p&gt;
&lt;p&gt;Link to original article: &lt;a href="https://guangzhengli.com/en/blog/en/how-to-integrate-umami-for-free-to-blog-site/"&gt;https://guangzhengli.com/en/blog/en/how-to-integrate-umami-for-free-to-blog-site/&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>