Coder Social home page Coder Social logo

ansidev / swetrix-vue Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 386 KB

Swetrix Tracking integration for Vue v3

Home Page: https://swetrix-vue.netlify.app/?utm_source=github&utm_medium=repository

License: MIT License

TypeScript 88.07% Shell 6.89% JavaScript 5.04%
swetrix vue vue3 vuejs vuejs3 analytics tracking

swetrix-vue's Introduction

Swetrix Analytics

Swetrix Vue 3 integration

npm version Build Status Sourcegraph Netlify Status

Unofficial Swetrix Analytics integration for Vue.js.

Integration

Install

Run the following command to install in your project:

npm install swetrix-vue

Or with yarn:

yarn add swetrix-vue

Or with pnpm:

pnpm add swetrix-vue

Basic usage

You can now import, and use the Swetrix hook on your project:

// ./src/main.ts

import { createApp } from 'vue'
import Swetrix from 'swetrix-vue'

const app = createApp({})

app.use(Swetrix, {
  pid: 'SWETRIX_PROJECT_ID',
  // optional options
  initOptions: {
    // options
  },
  pageViewsOptions: {
    // options
  },
})

Debug-mode

When developing in localhost, Swetrix does not send events to avoid using your quota.
You can enable debug mode to send events when testing things locally. It will also log messages to console.

// ./src/main.ts

import { createApp } from 'vue'
import Swetrix from 'swetrix-vue'

const app = createApp({})

app.use(Swetrix, {
  pid: 'SWETRIX_PROJECT_ID',
  initOptions: {
    debug: true,
    // other options
  },
})

Advanced options

useSwetrix hook accepts 3 parameters: PID, initOptions, pageViewsOptions.
See the official documentation page for more details.
You can always create an issue in case of any questions! ๐Ÿ˜€

Contribution

Feel free to contribute to the source code by opening a pull requests.

For any questions, you can open an issue, refer to the official Swetrix FAQs page or reach them at [email protected].

Self-hosted API

If you are selfhosting the Swetrix-API, be sure to point the apiUrl parameter to: https://yourapiinstance.com/log

Donate

You can support this project by donating me at:

swetrix-vue's People

Contributors

ansidev avatar renovate[bot] avatar

Watchers

 avatar

Forkers

blaumaus

swetrix-vue's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/example_vitejs.yml
.github/workflows/publish.yml
npm
package.json
  • swetrix ^2.0.1
  • @commitlint/cli ^17.4.2
  • @commitlint/config-conventional ^17.4.2
  • eslint ^8.32.0
  • husky ^8.0.3
  • standard-version ^9.5.0
  • tsup ^6.5.0
  • typescript ^5.0.0
  • vue ^3.2.45
  • vue ^3
  • pnpm 8.6.2

  • Check this box to trigger a request for Renovate to run again on this repository

Swetrix.js v2 release

Hi! Could you please release a new version of swetrix-vue module which includes swetrix v2.0.0 in it?
It's needed so the customers that use swetrix-vue would be able to see Performance data in their Dashboards.

Thank you and thanks for creating this amazing plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.