New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hexlet/analytics-plugin-n8n

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hexlet/analytics-plugin-n8n

plugin for analytics

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
4
Created
Source

analytics-n8n

This library exports the n8n plugin for the analytics package.

Installation

npm install analytics @hexlet/analytics-plugin-n8n

How to use

import Analytics from 'analytics';
import N8nPlugin from '@hexlet/analytics-plugin-n8n';

const n8nConfig = {
  event_one: 'https://workflows.hexlet.io/webhook/pathOne', // this must be n8n trigger url
  event_two: 'https://workflows.hexlet.io/webhook/pathTwo',
};

const analytics = Analytics({
  app: 'my-app',
  plugins: [
    N8nPlugin({
      workflows: n8nConfig,
    }),
  ],
});

// track an event
analytics.track('signed_up', { email: 'user@example.com' });

In browser

<script src="https://unpkg.com/analytics/dist/analytics.min.js"></script>
<script src="https://unpkg.com/@hexlet/analytics-plugin-n8n/dist/main.js"></script>
<script>
  var Analytics = _analytics.init({
    app: 'my-app',
    plugins: [
      N8nPlugin({
        workflows: n8nConfig,
      }),
    ],
  });

  Analytics.track('signed_up', { email: 'user@example.com' }); // track an event
</script>

Keywords

n8n

FAQs

Package last updated on 30 May 2022

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