Skip to content

nilportugues/act

 
 

Repository files navigation

Multi-purpose URI tracker

Project license


✏️ Multi-purpose URI tracker.

Coded with ❤️ by Simone Primarosa.


Synopsis

Act is an API service that allows you to track user actions. An action is either a page/email view or a click on a link.
Each time a request is made to act, it automatically collects the timestamp, the operating system, the browser, the city, the region, and the country from where the request comes and then the data are written to the cloud storage of your choice and no data is stored on our side.
Currently, the only storage type supported is Google Sheets!

Google Sheets

Setup

1 - Open Google Sheets.
2 - Create a new blank document.
3 - Share the document with access@act-uri-tracker.iam.gserviceaccount.com.
4 - Copy the spreadsheet id from the URL bar.
5 - Use the spreadsheet id to make requests to act as shown below.

Track views

Insert this image inside the page you want to track substituting <SpreadsheetId> and <PageName> with the appropriate values.

<img src="https://act.now.sh/gs/<SpreadsheetId>?a=<PageName>" />

Example:
Each time you see this image a new row is added at the end of this spreadsheet.

Track clicks

Insert this inside the page substituting <SpreadsheetId>, <ActionName>, and <LinkToTrack> with the appropriate values.

<a href="https://act.now.sh/gs/<SpreadsheetId>?a=<ActionName>&r=<LinkToTrack>" />

Example:
Each time you click here a new row is added at the end of this spreadsheet.

API

METHOD URL RESPONSE BEHAVIOUR
GET https://act.now.sh/gs/<SpreadsheetId> A 1x1 transparent png image. A new line is appended to the spreadsheet.
GET https://act.now.sh/gs/<SpreadsheetId>?a=<data> A 1x1 transparent png image. A new line is appended to the spreadsheet.
GET https://act.now.sh/gs/<SpreadsheetId>?r=<uri> A 302 redirect to the uri. A new line is appended to the spreadsheet.
GET https://act.now.sh/gs/<SpreadsheetId>?a=<data>&r=<uri> A 302 redirect to the uri. A new line is appended to the spreadsheet.

Other storage

Currently, act supports only Google Sheets, but contributions to extend its capabilities are welcome.

Development

If you want to run it locally, you need to run the following commands.

git clone https://github.com/simonepri/act.git
cd act

npm i
npm start

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the license file for details.

About

✏️ Multi-purpose URI tracker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%