npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

wideangle-nuxt

v2.0.0

Published

Wide Angle Analytics module for Nuxt

Readme

Wide Angle Analytics Nuxt3 Module

License Latest Downloads Nuxt Wide Angle

Wide Angle Analytics Large Logo

Wide Angle Analytics module for Nuxt

Enable privacy-friendly web analytics in your Nuxt 3.x application with our official plugin.

Wide Angle Analytics is powerful, strictly-GDPR compliant Google Analytics alternative.

How to get started

You can enable Wide Angle Analytics in your Nuxt projects in just a few steps. No complex configuration needed, as our sane defaults provide you with a reliable and privacy-centric deployment out of the box.

  1. Go to the Wide Angle website and create an account. You can enjoy a free 14-day trail. No Credit Card is required. Learn more.
  2. Create a new site and activate it.
  3. Install the wideangle-vuejs plugin in your Vue application.
npx nuxi@latest module add wideangle
  1. Enable and configure the module.
export default defineNuxtConfig({
  modules: ['wideangle-nuxt'],

  runtimeConfig: {
    public: {
      wideangle: {
        siteId: "8D27G3B9ACA01F4241"
      }
    }
  }
})

Configuring Wide Angle Analytics plugin

The Wide Angle Analytics plugin must be initialized with a configuration object as there are required settings without defaults.

option|description|required|default|example ------|-----------|--------|-------|------- siteId| The Site ID from the Wide Angle Site settings| :white_check_mark: | none | 8D27G3B9ACA01F4241 domain| Domain hosting the script, can be found in Wide Angle Analytics Site settings | :x: | stats.wideangle.co | your.domain.com fingerprint | Should script use browser fingerprinting; this might require collecting consent depending on the applicable laws | :x: | false | true suppressDnt | Should script ingore Do Not Track browser setting. If not enabled, no events will be sent if user's browser has DNT enabled | :x: | false | true includeParams | An array of query parameters that can be passed as part of tracking event. By default only utm_* and ref parameters are passed in the event | :x: | [] | ['sessionId', 'offset'] excludePaths | An array of URL paths that should not trigger default events such as page view, page leave | :x: | [] | ['^/wp-admin/.*', ] ignoreHash | If enabled, a change in the URL fragment will not trigger page view event | :x: | false | true consentMarker | Name of cookie (with or without) which presence is treated as implied consent; when not defined, consent is not determined by cookie | :x: | n/a | WAA_CONSENT=true

You can find more details about these settings in the Wide Angle Analytics documentation.

Example:

export default defineNuxtConfig({
  modules: ['wideangle-nuxt'],

  runtimeConfig: {
    public: {
      wideangle: {
        siteId: "8D27G3B9ACA01F4241",
        domain: "your.domain.com",
        fingerprint: false,
        suppressDnt: true,
        includeParams: ['q', 'customerId'],
        excludePaths: ['^/admin.*'],
        ignoreHash: true,
        consentMarker: `WAA_CONSENT=true`
      }
    }  
  }
})

Usage

The Wide Angle Analytics provides a composable which can be used in your component.

<template>
  <button @click="sendEvent">Send Event</button>
</template>

<script setup>
  import { useWideAngle } from '#imports';

  const sendEvent = () => {
    useWideAngle().dispatchEvent('basket-open', {'page': 'catalogue'}, {'item-price': 599.00, 'basket-total': 1299.00});
  }
</script>

You will find a fully functional example in this repository.

Tracking Pageviews

No action necessary. The tracker script automatically issues Page View and Page Leave events.

Tracking Events

Wide Angle supports three specialized events:

  • clicks
  • downloads
  • custom actions

Site has to have these events enabled in the Wide Angle Analytics configuration prior to usage. Otherwise the tracker script will not send these events. Consult the official documentation regarding how to enable event handling.

Tracking Clicks

Currently Click Events are emitted automatically based on element data attributes.

Tracking Downloads

Depending on the configured mode, the Download Event will fire automatically when either:

  • a file with recognized extension is being downloaded, or
  • when a link is marked with data-waa-name attribute.

Tracking Custom Actions

Custom actions are the most flexible and can be triggered directly from Vue components. As such, their usage is not limitted due to the Shadow DOM.

Example:

<template>
  <button @click="sendEvent()">Send Event</button>    
</template>

<script setup>
import { useWideAngle } from '#imports'

const sendEvent = async () => {
  const params = {
    session: 'cjhw92nf9aq',
    cohort: 'c1233'
  }
  useWideAngle().dispatchEvent('interest', params);  
}
</script>

Module Assets

You can find a high-resolution Wide Angle Analytics logo and icon on our media page.

Recording consent

The Wide Angle Analytics, thanks to is privacy-first, anonymous approach to web traffic analytics does not requires consent by default.

However, we do offer multiple tools that support collecting consent should it be required in your use case.

Opt-Out by default

If the visitors browsers has DoNotTrack setting enabled in the browser, it will be understood as opt-out and not tracking events will be issued.

You website can't overwrite this behaviour by specifying suppressDnt setting.

wideangle: {
  siteId: "8D27G3B9ACA01F4241",        
  suppressDnt: true
}

## Opt-In or Opt-Out based on Cookie

Wide Angle can be configure to handle presence of a cookie, or a cookie with specific value, as an implicit consent. Lack of the cookie will be handled as implicit opt-out.

Example configuration with cookie marker, expecting cookie name WAA_CONSENT with value true:

wideangle: {
  siteId: "8D27G3B9ACA01F4241",        
  consentMarker: "WAA_CONSENT=true"
}

Programmatic consent

The Wide Angle serving offers two additional methods, which allow for recording tracking consent:

  • recordConsent(subjectId: String): void, and
  • revokeConsent()

Calling above methods on waa service will overwrite other consent mechanism (ie. DoNotTrack, and cookie marker).

Example usage:

<script setup>

import { useWideAngle } from '#imports'

useWideAngle().recordConsent('FHJ44111');

</script>