![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@snowplow/browser-plugin-form-tracking
Advanced tools
@snowplow/browser-plugin-form-tracking is a plugin for the Snowplow JavaScript tracker that allows you to track form interactions on your website. It helps in capturing form submissions, field changes, and other form-related events, providing valuable insights into user behavior and form performance.
Track Form Submissions
This feature allows you to track when a form is submitted. By enabling form tracking, the plugin will automatically capture form submission events and send them to the Snowplow collector.
const { newTracker } = require('@snowplow/browser-tracker');
const { FormTrackingPlugin } = require('@snowplow/browser-plugin-form-tracking');
newTracker('sp1', '{{collector_url}}', { plugins: [ FormTrackingPlugin() ] });
window.snowplow('enableFormTracking');
Track Field Changes
This feature allows you to track changes to form fields. By setting the `trackFieldChanges` option to true, the plugin will capture events whenever a form field value is changed.
const { newTracker } = require('@snowplow/browser-tracker');
const { FormTrackingPlugin } = require('@snowplow/browser-plugin-form-tracking');
newTracker('sp1', '{{collector_url}}', { plugins: [ FormTrackingPlugin() ] });
window.snowplow('enableFormTracking', { trackFieldChanges: true });
Custom Form Tracking
This feature allows you to specify which forms to track by providing a list of form selectors. This is useful if you only want to track specific forms on your website.
const { newTracker } = require('@snowplow/browser-tracker');
const { FormTrackingPlugin } = require('@snowplow/browser-plugin-form-tracking');
newTracker('sp1', '{{collector_url}}', { plugins: [ FormTrackingPlugin() ] });
window.snowplow('enableFormTracking', { forms: ['#myForm'] });
form-serialize is a lightweight library for serializing form data to JSON. Unlike @snowplow/browser-plugin-form-tracking, it does not provide tracking capabilities but is useful for handling form data in a structured format.
Formik is a popular library for building and managing forms in React. It provides a comprehensive set of tools for form validation, state management, and submission handling. While it does not offer tracking features, it is highly useful for form management in React applications.
redux-form is a library for managing form state in Redux. It integrates form state with the Redux store, making it easier to manage complex form interactions. Unlike @snowplow/browser-plugin-form-tracking, it focuses on state management rather than tracking user interactions.
Browser Plugin to be used with @snowplow/browser-tracker
.
Adds form tracking events to your Snowplow tracking.
Part of the Snowplow JavaScript Tracker monorepo.
Build with Node (10+) and Rush.
$ npm install -g @microsoft/rush
$ git clone https://github.com/snowplow/snowplow-javascript-tracker.git
$ rush update
With npm:
npm install @snowplow/browser-plugin-form-tracking
Initialize your tracker with the FormTrackingPlugin:
import { newTracker } from '@snowplow/browser-tracker';
import { FormTrackingPlugin } from '@snowplow/browser-plugin-form-tracking';
newTracker('sp1', '{{collector}}', { plugins: [ FormTrackingPlugin() ] }); // Also stores reference at module level
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:
import { enableFormTracking } from '@snowplow/browser-plugin-form-tracking';
enableFormTracking({options: { ... }});
Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).
Copyright (c) 2021 Snowplow Analytics Ltd, 2010 Anthon Pang.
All rights reserved.
FAQs
Form tracking for Snowplow
The npm package @snowplow/browser-plugin-form-tracking receives a total of 82,104 weekly downloads. As such, @snowplow/browser-plugin-form-tracking popularity was classified as popular.
We found that @snowplow/browser-plugin-form-tracking demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.