vue-reporting

Small reporting plugin for Vue.js supporting Google Analytics.

Usage no npm install needed!

<script type="module">
  import vueReporting from 'https://cdn.skypack.dev/vue-reporting';
</script>

README

vue-reporting

A small plugin to interface with some ananlytics/stat tracking services.

Currently only supports a small subset of Google Analytics functionality.

Methods

**create**

Initialize the analtyics.

this.$reporting.create({
    id: 'UI-123456789'
});

**page**

Set the page to track.

this.$reporting.page({
    path: String
});

**click**

Track a click event.

this.$reporting.click({
    category: String,
    action: String,
    eventLabel: String,
    eventValue: String,
    nonInteraction: [true || false]
});

Options

**driver**

default: 'google-analytics'

Set the driver for the plugin to use.

Currently only Google Analytics is supported.