Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change plugin name to wepublish #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ or
Import and initialise the tracker anywhere in the project

import Analytics from 'analytics'
import { matomoPlugin } from '@wepublish/analytics'
import { wepublish } from '@wepublish/analytics'

const analytics = Analytics({
app: 'Your app name',
plugins: [matomoPlugin()]
plugins: [wepublish()]
})

then call the method on page load e.g.
Expand Down
4 changes: 2 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare const matomoPlugin: () => {
declare const wepublish: () => {
name: string;
page: () => void;
track: (params: any) => void;
};
export { matomoPlugin };
export { wepublish };
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.matomoPlugin = void 0;
exports.wepublish = void 0;
const matomo_tracker_1 = require("@jonkoops/matomo-tracker");
const matomo = new matomo_tracker_1.default({
siteId: 1,
Expand All @@ -10,9 +10,9 @@ let pageInterval;
let pageTimeout;
let trackInterval;
let trackTimeout;
const matomoPlugin = () => {
const wepublish = () => {
return {
name: "wp-matomo-analytics",
name: "wp-analytics",
page: () => {
if (pageInterval) {
clearInterval(pageInterval);
Expand Down Expand Up @@ -79,4 +79,4 @@ const matomoPlugin = () => {
},
};
};
exports.matomoPlugin = matomoPlugin;
exports.wepublish = wepublish;
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ let pageTimeout: number;
let trackInterval: number;
let trackTimeout: number;

const matomoPlugin = () => {
const wepublish = () => {
return {
name: "wp-matomo-analytics",
name: "wp-analytics",
page: () => {
if (pageInterval) {
clearInterval(pageInterval);
Expand Down Expand Up @@ -94,4 +94,4 @@ const matomoPlugin = () => {
};
};

export { matomoPlugin };
export { wepublish };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wepublish/analytics",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "Analytics plugin for publishers.",
"license": "MIT",
"repository": "wepublish/analytics",
Expand Down