3.1.2 • Published 1 year ago

analytics-benson v3.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Analytics Benson

Analytics Benson is a lightweight and easy-to-use JavaScript library that allows developers to keep track of their website's analytics and statistics. It supports various web app types, including React, Express, and EJS templates.

Visit the tracking site to sign up for free!

Features

Analytics Benson allows you to track various aspects of user behavior on your website, including:

Device type (mobile, tablet, or desktop) Screen size (width and height) General Location for a map Timestamp of the visit Track multiple visits (1 per hour)

Installation

To install the package, run the following command in your project directory:

npm install analytics-benson

Usage

React and other JavaScript projects

  1. Import the analytics function from the package:
import analytics from 'analytics-benson';

Call the analytics function, passing in your siteName and clientId:

analytics('Your Site Name', 'your-client-id');

Place the function call in a suitable location in your app, such as in the root component or a layout component. In a React app, you can place the function call inside of a useEffect hook to ensure the function fires on page load.

CDN

If you prefer to use a CDN instead of installing the package, you can use jsDelivr:

Add the following script tags to your HTML file, replacing 'yourSiteName' and 'yourClientId' with the appropriate values:

<script src="https://cdn.jsdelivr.net/npm/analytics-benson@1.1.0/analytics.min.js"></script>
<script>
  analytics('yourSiteName', 'yourClientId');
</script>

License

This package is released under the MIT License.

2.0.3

1 year ago

2.0.2

1 year ago

2.2.3

1 year ago

2.0.5

1 year ago

2.2.2

1 year ago

2.0.4

1 year ago

2.2.5

1 year ago

2.0.7

1 year ago

2.2.4

1 year ago

2.0.6

1 year ago

2.2.7

1 year ago

2.0.9

1 year ago

2.2.6

1 year ago

2.0.8

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.1.2

1 year ago

2.0.15

1 year ago

2.1.1

1 year ago

2.0.16

1 year ago

2.0.13

1 year ago

2.0.14

1 year ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.10

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

2.0.19

1 year ago

2.0.17

1 year ago

2.0.18

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

1.1.0

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago