Skip to content

padfever/tel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tel

A click and action stream tracker.

Demo of tel

Usage

There are two parts to get this running: deploying the server and adding the client scripts.

Fork this repository

You'll want to commit your changes.

Deploy Server

  1. Create a bot in Telegram by following these (instructions)[https://core.telegram.org/bots#6-botfather].
  2. Save the bot API key and add the following line to packages/server/Dockerfile:
ENV telegram__bot_api_key <bot api key>
  1. Add this bot to the channel you'd like analytics messages to appear in.
  2. Reveal the channel/chat ID by following these (instructions)[https://stackoverflow.com/questions/33858927/how-to-obtain-the-chat-id-of-a-private-telegram-channel].
  3. Add the chat ID to the Dockerfile under packages/server/Dockerfile:
ENV telegram__channel_id <chat id>
  1. Build and deploy the server via docker to your favorite server:
cd packages/server;
docker build --name clarity/server@latest .
docker run -d --name server clarity/server@latest

Integrate Javascript Client

  1. Build the Javascript client:
cd packages/client-web;
npm run build;
  1. Copy the compiled Javascript to your static folder:
cd packages/client-web;
cp dist/js/index.js <path to static folder>
  1. Include via script tag.
<script src="<prefix>/index.js" type="application/javascript" async></script>
  1. Initialize the client:
init(<endpoint base url>)
  1. Add the aria-label attribute to any button you want to track :).

Remember to commit your changes!

About

A click and action stream tracker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published