# logify-google-analytics-transport

> Google Analytics transport for logify

Latest version **1.0.1** (published 2015-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install logify-google-analytics-transport
pnpm add logify-google-analytics-transport
yarn add logify-google-analytics-transport
bun add logify-google-analytics-transport
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-01-09 |
| First published | 2015-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Purpose Industries |
| Maintainers | lennon |
| Keywords | logify, google, analytics, transport, logger |

## Links

- npm: https://www.npmjs.com/package/logify-google-analytics-transport
- Repository: https://github.com/purposeindustries/node-logify-google-analytics-transport
- Issues: https://github.com/purposeindustries/node-logify-google-analytics-transport/issues
- npm.io page: https://npm.io/package/logify-google-analytics-transport

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-01-09
- 1.0.0 — 2015-01-08

## README

# logify-google-analytics-transport

Google Analytics transport for [logify](https://npmjr.org/package/logify).

## Install

Install the [package](https://npmjs.org/package/logify-google-analytics-transport) with [`npm`](https://npmjs.org/):

```sh
$ npm install logify-google-analytics-transport
```

## Usage

```js
var logify = require('logify');
var transport = require('logify-google-analytics-transport');

var logger = logify();
logger.add(transport(ga));

logger.info({
  type: 'event',
  category: 'foo',
  action: 'bar',
}, 'Some description for other logger transports');
```

Just set the context for each message, log level is ignored for this transport.
You can event create dedicated event loggers:

```js
var eventLogger = logger.child({
  type: 'event'
});

logger.info({
  category: 'foo',
  action: 'bar',
});

// or

var actionLogger = logger.child({
  type: 'event',
  category: 'foo',
});

actionLogger.info({
  action: 'bar'
});
```

## Supported message types

### `pageview`

You can pass a `page` variable to override the default value (which is the current page).

```js
logger.info({
  type: 'pageview',
  page: '/foo',
});
```

### `event`

```js
logger.info({
  type: 'event',
  category: 'foo',
  action: 'bar',
  label: 'baz',
  value: 1337
});
```

### `exception`

```js
logger.error(err);
```

### `timing`

```js
logger.info({
  type: 'timing',
  category: 'foo',
  variable: 'bar',
  value: 1337,
  label: 'baz',
  page: 'qux',
});
```

## License

MIT

---
_Source: https://npm.io/package/logify-google-analytics-transport · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
