Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gokaygurcan/analytics
Analytics beacon for general purpose.
https://github.com/gokaygurcan/analytics
Last synced: 7 days ago
JSON representation
Analytics beacon for general purpose.
- Host: GitHub
- URL: https://github.com/gokaygurcan/analytics
- Owner: gokaygurcan
- License: mit
- Created: 2016-10-03T17:25:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T23:42:52.000Z (9 months ago)
- Last Synced: 2024-05-02T01:47:26.020Z (8 months ago)
- Language: JavaScript
- Homepage: https://gokaygurcan.github.io/analytics/
- Size: 140 KB
- Stars: 14
- Watchers: 2
- Forks: 15
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Analytics
Analytics beacon for general purpose.---
![analytics](https://analytics.gokaygurcan.com/UA-55204660-5/gokaygurcan/analytics.svg?style=flat-square)
![website](https://img.shields.io/website/https/analytics.gokaygurcan.com.svg?style=flat-square)
![travis ci](https://img.shields.io/travis/gokaygurcan/analytics.svg?style=flat-square)
![vulnerabilities](https://snyk.io/test/github/gokaygurcan/analytics/65f28c8313247b99daa4226ed27f5605085eceaf/badge.svg?style=flat-square)
![license](https://img.shields.io/github/license/gokaygurcan/analytics.svg?style=flat-square)---
## Installation
You can deploy to Heroku:
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/gokaygurcan/analytics/tree/master)
or run on your own machine:
```bash
git clone [email protected]:gokaygurcan/analytics.git
cd analytics
npm install
npm start
```## Showcase
Type
Google (svg)
Google (png)
Yandex (svg)
Yandex (png)
Flat square
Flat
Plastic
Social
Pixel
(there is a pixel here)
## Usage
You can put the beacon in your Readme file to track GitHub statistics:
```markdown
![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg)
```Or, you can call the pixel via AJAX call or something similar to track some pages/events:
```javascript
$.ajax({
method: 'GET',
url: 'https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.gif'
}).done(function(response) {
console.log(response); // this will be a 1x1 pixel image though
});
```> Note: you can use anything you like but using organization_name/repository_name will help you if you want to use more than one repository with only one tracking id.
## Examples
You can use either _svg_ or _png_ extension with _style_ querystring. Default is _flat-square_.
- Flat square: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=flat-square)`
- Flat: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=flat)`
- Plastic: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=plastic)`
- Social: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=social)`
### Yandex (not done yet)
You can use either _svg_ or _png_ extension with _style_ querystring. Default is _flat-square_.
- Flat square: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=flat-square)`
- Flat: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=flat)`
- Plastic: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=plastic)`
- Social: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.svg?style=social)`
### Pixel
You can only use gif extension, no svg or png can be used as a pixel image.
- Pixel: `![analytics](https://analytics.gokaygurcan.com/UA-XXXXXXXX-X/organization_name/repository_name.gif)`
## License
MIT © [Gökay Gürcan](https://www.gokaygurcan.com/)