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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-woopra

v1.1.0

Published

Plugin to integrate Woopra on vue.js projects

Downloads

2

Readme

vue-woopra

Plugin to integrate Woopra on vue.js projects

Installation

npm require vue-woopra

Usage

Import vue-woopra on your project, and add the plugin on Vue.js with the global method Vue.use()

import VueWoopra from 'vue-woopra'
Vue.use(VueWoopra)

Configuration

To configure vue-woopra, you can pass your settings on the Vue.use() global method.

Vue.use(VueWoopra, {configs: {domain: 'mywebsite.ca'}, identify: {email: '[email protected]'})

Configs

The Woopra tracker can be customized using the configs objects. Find the list of options : Configuration on Woopra

configs: {domain: 'mywebsite.ca', cookie_name: 'mywebsite_tracker'}

Identify

To identify a customer, you need to send their email address to Woopra as a custom visitor property. You can add any properties you want to save for this current visitor.

identify: {email: '[email protected]', username: 'MY_VISITOR', is_buyer: true, products_on_cart: 5}

Directives availables

woopra-identify

To identify a customer, you need to send their email address to Woopra as a custom visitor property. You can add any properties you want to save for this current visitor. If you added the object identify on the configuration of the plugin, do not use the directive.

<div id="app" v-woopra-identify="{email: '[email protected]', username: 'MY_VISITOR', is_buyer: true, products_on_cart: 5}"></div>

woopra-track

To track an event, you can use the woopra-track directive. It requires as argument an array with two keys. The first key is the name of the event that you are tracking. The second is an object of any properties you want to track with the event. Find more informations on the Woopra Javascript SDK documentation

<p v-woopra-track="['MY_CUSTOM_EVENT_NAME', {propertie_one: 'value', propertie_two: 'value'}]">Active my account</p>

We track for now only if the user clicks on the item

Methods availables

Vue-woopra add in your vue instance two methods

identify(user_object)

This method is identical to the woopra-identify directive. The only argument must be an object with your visitor property.

this.$woopra.identify({email: '[email protected]', username: 'MY_VISITOR', is_buyer: true, products_on_cart: 5})

track(event_name, properties)

This method is identical to the woopra-track directive, but with two arguments. The first argument must be a string for your event name. The second argument must be an object of any properties you want to track with the event.

this.$woopra.track('MY_CUSTOM_EVENT_NAME', {propertie_one: 'value', propertie_two: 'value'})