Stormkit Logo
Stormkit Logo
docsblogwhats new?pricingGitHubTwitterDiscordDiscordlogin

Tracking user data using Stormkit and Plausible

Apr 09, 2022

Easily inject snippets into your application without deploying your application.

Snippets

With the help of our Snippets functionality you can inject any code into your application without deploying it. This is very powerful as you can turn on and off integrations instantly.

Plausible and Stormkit

For the purpose of this blog post, we will be using Plausible as an example but this functionality can be used with any third party tool. Plausible is an open source analytic platform, you can either host it yourself or use their cloud offering. Let's get started by adding our endpoint to Plausible:

Plausible

We're going to use https://paintersheer-foihe8.stormkit.dev/ as an example. After providing the endpoint to Plasuible, it will generate a script similar to the one below:

<script
  defer
  data-domain="paintersheer-foihe8.stormkit.dev"
  src="https://plausible.io/js/plausible.js"
></script>

Now head to your App on Stormkit, select the Environment which the snippet will be injected and click on Snippets from the environment menu on the right side of the page.

Snippets

Select add snippet and paste the code provided by Plausible.

Add snippet

Once you visit your web site you will notice in Plausible dashboard that visitor data is displayed.

Conclusion

In this example, we added analytic capabilities to our website without altering the source code. The snippets functionality allows us to enable or disable injected code without any deployment.

Hope you found this post useful!

Stormkit Logo

2024 Stormkit, Inc. ©

company
PricingPrivacy policyTerms
\n```\n\nNow head to your **App** on Stormkit, select the **Environment** which the snippet will be injected and click on **Snippets** from the environment menu on the right side of the page.\n\n
\n \"Snippets\"\n
\n\nSelect add snippet and paste the code provided by Plausible.\n\n
\n \"Add\n
\n\nOnce you visit your web site you will notice in [Plausible](https://plausible.io) dashboard that visitor data is displayed.\n\n## Conclusion\n\nIn this example, we added analytic capabilities to our website without altering the source code. The snippets functionality allows us to enable or disable injected code without any deployment.\n\nHope you found this post useful!\n","navigation":[{"path":"case-study-elham","title":"Case Study: Elham - a Leading Learning Platform","description":"Discover how Elham, a leading learning platform, reduced deployment times from 24 hours to 15 minutes, cut hosting costs, and scaled to handle millions of visitors per month with Stormkit’s self-hosted, compliant, and customizable frontend hosting solution.","search":false,"date":"2024-09-03","active":false},{"path":"how-to-deploy-docusarous","title":"How do deploy Docusaurus project to Stormkit","description":"Quick guide to show how to deploy Docusaurus project to Stormkit","search":false,"date":"2024-04-05","active":false},{"path":"how-to-deploy-gatsby","title":"How do deploy Gatsby project to Stormkit","description":"Quick guide to show how to deploy Gatsby project to Stormkit","search":false,"date":"2024-04-04","active":false},{"path":"how-to-deploy-vitepress","title":"How do deploy VitePress project to Stormkit","description":"Quick guide to show how to deploy VitePress project to Stormkit","search":false,"date":"2024-04-04","active":false},{"path":"guide-to-understanding-choosing-right-analytic-tools-for-your-website","title":"A Guide to Understanding and Choosing the Right Analytic Tools for Your Website","description":"This post explores the diverse landscape of web analytics tools, delving into alternatives like GoatCounter, Plausible, Umami, PostHog and Stormkit. Highlighting their unique features and emphasizing the growing importance of self hosted solutions.","search":false,"date":"2024-01-24","active":false},{"path":"postgresql-with-golang-crafting-insert-queries","title":"PostgreSQL with Golang Crafting Insert Queries with Text/Templates","description":"Stormkit's approach of eschewing ORM and query builders in favor of raw SQL queries using text/templates.","search":false,"date":"2024-01-21","active":false},{"path":"site-search-with-react-and-minisearch","title":"Local search with react and minisearch","description":"This blog post walks you through our implementation for local search using minisearch and creating react component as search box.","search":false,"date":"2023-12-16","active":false},{"path":"building-dynamic-web-applications-with-ssr-and-htmx","title":"Building Dynamic Web Applications with SSR, Htmx and Handlebars.js","description":"Learn how to create interactive web applications using Server-Side Rendering (SSR), htmx for seamless AJAX interactions, and Handlebars.js for dynamic templating.","search":true,"date":"2023-11-09","active":false},{"path":"unlocking-dynamic-web-interactions-with-htmx","title":"Unlocking dynamic web interactions with htmx","description":"Unlock the potential of htmx, a lightweight JavaScript library for dynamic web interactions. Simplify AJAX requests, page updates, and DOM manipulation with ease. See how htmx integrates seamlessly with server-side rendering.","search":true,"date":"2023-11-02","active":false},{"path":"getting-started-with-vitejs","title":"Combining Vite.js with Stormkit for React Static Sites Guide","description":"Learn how to leverage the lightning-fast Vite.js build system and Stormkit's seamless deployment platform for React static sites. Follow our quick start guide and explore migration options from Webpack. Plus, discover an all-in-one template project for server-side rendering, static page generation, and API development using React and Vite.js.","search":false,"date":"2023-10-08","active":false},{"path":"how-ai-helping-us-catch-phishing-websites","title":"How AI helps us catching phishing websites","description":"This post explores how Stormkit combats phishing on their hosting platform. They initially used a javascript program for detection, but faced false positives and evasion tactics. By integrating AI through Teachable Machine and TensorFlow.js, they markedly improved accuracy.","search":false,"date":"2023-09-26","active":false},{"path":"faq","title":"FAQ","description":"Our Frequently Asked Questions (FAQ) page is designed to provide you with quick and helpful information about Stormkit.","search":false,"date":"2023-08-17","active":false},{"path":"writing-a-headless-cms-from-scratch--planning","title":"Writing a Headless CMS from scratch","subtitle":"Part 1 - Planning","description":"Welcome to the exciting journey of building a headless CMS from scratch! In this blog post series, we will embark on a step-by-step adventure, exploring the process of creating a powerful content management system tailored to our unique needs.","search":false,"date":"2023-06-04","active":false,"author":{"name":"Savas Vedova","img":"https://pbs.twimg.com/profile_images/1681635649298874370/IMQmYpcA_400x400.jpg","twitter":"@savasvedova"}},{"path":"why-we-are-dropping-support-for-next-js","title":"Why we are dropping support for Next.js","description":"In our continuous pursuit of delivering the best developer experience, we've made a bold decision. We're dropping serverless support for Next.js.","search":true,"date":"2023-05-21","active":false},{"path":"monitoring-app-using-stormkit-and-supabase","title":"Monitoring system using Stormkit and Supabase","description":"Learn how to monitor your website's URL status using Stormkit and Supabase. Easy to set up and cost-efficient, this powerful tool can send notifications to Discord, track historical data, and more. Check out the source code now!","search":false,"date":"2023-01-24","active":false},{"path":"factory-pattern-for-go-tests","title":"Factory pattern for Go tests","description":"This article will show you how we improved our Go unit tests worklow using a factory pattern.","search":false,"date":"2022-11-01","active":false},{"path":"how-to-create-content-site","title":"How to create and deploy documentation page using nuxt.js and Stormkit under 5 minutes","description":"Learn how to create a website in under 5 minutes with this step-by-step guide.","search":true,"date":"2022-09-23","active":false},{"path":"migrating-your-app-from-webpack-to-vite","title":"Migrating your app from Webpack to Vite","description":"Learn how to migrate your app from Webpack to Vite with this quick guide. Discover the configuration options used in Vite and the rationale behind the migration.","search":false,"date":"2022-08-29","active":false},{"path":"using-analytic-tools-with-stormkit","title":"Tracking user data using Stormkit and Plausible","description":"Learn how to track user data using Stormkit and Plausible without deploying your application. Inject snippets instantly with this powerful functionality.","search":true,"date":"2022-04-09","active":true},{"path":"whats-new","title":"Whats New?","description":"Discover the latest changes and improvements to Stormkit. Stay up-to-date and get the most out of our platform.","search":false,"active":false}]}