Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@erst-vg/piwik-event-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@erst-vg/piwik-event-wrapper

Thin wrapper used by 3rd party applications to collect and send end-user behavior events to Virksomhedsguiden main platform.

  • 2.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

piwik-event-wrapper

Thin wrapper used by 3rd party applications to collect and send end-user behavior events to Virksomhedsguiden main platform.

Installation

$ npm install @erst-vg/piwik-event-wrapper

Piwik service

Using the Piwik service, it is possible to invoke tracking functions from any depth of the component tree. The only requirement is Piwik service must be initialized in the entry point component. It supports both Options API and Composition API.

Init using Options API

Initialize Piwik service from the entry point component

piwikService.init(this.$emit);

Init using Composition API

Initialize Piwik service using Vue 3 script setup in the entry point component

// Specify only the applicable DataEvents
const emit = defineEmits([DataEvents.START_EVENT]);
piwikService.init(emit);

Usage

Using the initialized Piwik service, invoke one of the following functions whenever tracking is needed:

  • emitPageViewEvent
  • emitDownloadEvent
  • emitCTAClickEvent
  • emitStartEvent
  • emitSlutEvent
// Usage from another component
piwikService.emitStartEvent();

Legacy

It is still possible to use the legacy approach, but is no longer recommended due to techinal limitations.

Usage

Invoke one of the following functions provided by this package whenever tracking is needed. Every function should be called with the instance of the Vue applikation (this) as the first argument.

  • emitPageViewEvent
  • emitDownloadEvent
  • emitCTAClickEvent
  • emitStartEvent
  • emitSlutEvent
  • emitNaesteEvent (deprecated)
  • emitForrigeEvent (deprecated)
  • emitFritekstEvent (deprecated)
emitPageViewEvent(this) // "this" being the Vue instance of the root component

License

MIT licens

Keywords

FAQs

Package last updated on 30 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc