All Projects → lukeed → Ganalytics

lukeed / Ganalytics

Licence: mit
A tiny (312B) client-side module for tracking with Google Analytics

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ganalytics

Centcount Analytics
An open-source web analytics software. Developed by using PHP + MySQL + Redis, Can be easily deployed on your own server, 100% data ownership.
Stars: ✭ 249 (-49.29%)
Mutual labels:  analytics, google-analytics
Stop.Google.Analytics.Ghost.Spam.HOWTO
How to stop Google Analytics "Ghost" Spam using a well curated list of spam referrer domains and web sites. Simple and easy to use with instructions for creating Segments in Google Analytics using our google-exclude files.
Stars: ✭ 21 (-95.72%)
Mutual labels:  analytics, google-analytics
dashflare
🕵🏼‍♀️ Open Source and privacy-focused analytics solution. 📊 Advanced monitoring for your website behind Cloudflare
Stars: ✭ 78 (-84.11%)
Mutual labels:  analytics, google-analytics
Vue Gtag
Global Site Tag plugin for Vue (gtag.js)
Stars: ✭ 445 (-9.37%)
Mutual labels:  analytics, google-analytics
Laravel Gamp
📊 Laravel Google Analytics Measurement Protocol Package
Stars: ✭ 271 (-44.81%)
Mutual labels:  analytics, google-analytics
Ackee
Self-hosted, Node.js based analytics tool for those who care about privacy.
Stars: ✭ 3,140 (+539.51%)
Mutual labels:  analytics, google-analytics
Social-Media-Monitor
Automatically monitor and log fan counters from social media(Facebook Pages, Twitter, Instagram, YouTube, Google+, OneSignal, Alexa) using APIs to Google Spreadsheet. Very useful for website admins and social media managers.
Stars: ✭ 36 (-92.67%)
Mutual labels:  analytics, google-analytics
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+2770.88%)
Mutual labels:  analytics, google-analytics
wp-analytify
Google Analytics Dashboard Plugin For WordPress By Analytify
Stars: ✭ 20 (-95.93%)
Mutual labels:  analytics, google-analytics
aws-web-analytics
Privacy-focused alternative to Google Analytics on AWS Pinpoint
Stars: ✭ 45 (-90.84%)
Mutual labels:  analytics, google-analytics
Analytics
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for Meteor
Stars: ✭ 211 (-57.03%)
Mutual labels:  analytics, google-analytics
Staccato
Ruby library to perform server-side tracking into the official Google Analytics Measurement Protocol
Stars: ✭ 380 (-22.61%)
Mutual labels:  analytics, google-analytics
Magento2 Google Tag Manager
Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.
Stars: ✭ 208 (-57.64%)
Mutual labels:  analytics, google-analytics
Next Ga
Next.js HOC to integrate Google Analytics on every page change
Stars: ✭ 228 (-53.56%)
Mutual labels:  analytics, google-analytics
React Tracker
React specific tracking library, Track user interaction with minimal API!
Stars: ✭ 191 (-61.1%)
Mutual labels:  analytics, google-analytics
web-analytics-handbook
Handbook - Rendezvous between developers and web data
Stars: ✭ 23 (-95.32%)
Mutual labels:  analytics, google-analytics
Save Analytics From Content Blockers
A proxy back end for Google Tag Manager & Google Analytics
Stars: ✭ 159 (-67.62%)
Mutual labels:  analytics, google-analytics
Angulartics
Analytics for AngularJS applications.
Stars: ✭ 1,966 (+300.41%)
Mutual labels:  analytics, google-analytics
svelte-google-analytics
Google Analytics component for Svelte
Stars: ✭ 41 (-91.65%)
Mutual labels:  analytics, google-analytics
Signal
Simple and beautiful open source Analytics 📊
Stars: ✭ 295 (-39.92%)
Mutual labels:  analytics, google-analytics

ganalytics Build Status

A tiny (312B) client-side module for tracking with Google Analytics

This module exposes three module definitions:

  • ES Module: dist/ganalytics.mjs
  • CommonJS: dist/ganalytics.js
  • UMD: dist/ganalytics.min.js

Please see Releases for changelog!

Install

$ npm install --save ganalytics

Usage

const GAnalytics = require('ganalytics');

const ga = new GAnalytics('UA-XXXXXXXX-X', { aid:1 });
// or
const ga = GAnalytics('UA-XXXXXXXX-X', { aid:1 });

ga.send('pageview');
ga.send('pageview', { dt:'Foobar', dp:'/foo' });

ga.send('event', { ec:'Video', ea:'Play', el:'Home Hero' });

API

GAnalytics(trackerID, options, toWait)

trackerID

Type: String

Your Google Analytics tracker ID; eg UA-XXXXXXXX-X

options

Type: Object

Any common, general options that this instance should hold onto.

Note: Any option key can be redefined or overwritten within a send() call.

options.aip

Type: Integer
Default: 0

Anonymize the sender's IP address. See Anonymize IP.

options.an

Type: String

Specifies the application's name. See Application Name.

options.aid

Type: String

Specifies the application identifier. See Application ID.

options.aiid

Type: String

Specifies the application installer identifier. See Application Installer ID.

options.av

Type: String

Specifies the application verison. See Application Version.

options.cid

Type: String

Anonymously identify a particular user, device, or browser instance. This should be persisted so that repetitive session use the same identifier. See Client ID.

Important This is required when options.uid is not defined.

options.uid

Type: String

An identifier for a known user, if possible. This value should never be persisted. See User ID.

Important This is required when options.cid is not defined.

options.ds

Type: String

Indicates the data source type of the hit; eg web or app. See Data Source.

toWait

Type: Boolean
Default: false

When truthy, a pageview event will not be sent immediately upon initialization.

ga.send(type, params)

type

Type: String

The type of hit to send. Must be one of these: pageview, screenview, event, transaction, item, social, exception, or timing.

params

Type: Object

The parameters to send based on the type of hit.

Please follow the links for each available parameter set:

For pageview hits only, if no params are provided, then the document.title and location.href values will be auto-filled. This allows you to send valid requests by writing:

ga.send('pageview');
// is the same as:
//=> ga.send('pageview', { dt:document.title, dl:location.href })

License

MIT © Luke Edwards

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].