
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
@amplitude/plugin-network-capture-browser
Advanced tools
This plugin is in beta at the moment, naming and interface might change in the future.
Browser SDK plugin for autocapture.
This package is published on NPM registry and is available to be installed using npm and yarn.
# npm
npm install @amplitude/plugin-network-capture-browser@beta
# yarn
yarn add @amplitude/plugin-network-capture-browser@beta
This plugin works on top of the Amplitude Browser SDK, generating auto-tracked events and sending to Amplitude.
To use this plugin, you need to install @amplitude/analytics-browser
version v1.9.1
or later.
@amplitude/analytics-browser
@amplitude/plugin-network-capture-browser
import * as amplitude from '@amplitude/analytics-browser';
import { autocapturePlugin } from '@amplitude/plugin-network-capture-browser';
The plugin accepts 1 optional parameter, which is an Object
to configure the allowed tracking options.
const plugin = autocapturePlugin({
cssSelectorAllowlist: [
'.amp-tracking',
'[amp-tracking]'
],
pageUrlAllowlist: [
'https://amplitude.com',
new RegExp('https://amplitude.com/blog/*')
],
});
Examples:
cssSelectorAllowlist
will only allow tracking elements like:
<button amp-tracking>Click</button>
<a class="amp-tracking">Link</a>
pageUrlAllowlist
will only allow the elements on URL "https://amplitude.com" or any URL matching the "https://amplitude.com/blog/*" to be trackedName | Type | Default | Description |
---|---|---|---|
cssSelectorAllowlist | string[] | ['a', 'button', 'input', 'select', 'textarea', 'label', '[data-amp-default-track]', '.amp-default-track'] | When provided, only allow elements matching any selector to be tracked. |
pageUrlAllowlist | (string|RegExp)[] | undefined | When provided, only allow elements matching URLs to be tracked. |
shouldTrackEventResolver | (actionType: ActionType, element: Element) => boolean | undefined | When provided, overwrite all other allowlists and configurations. |
dataAttributePrefix | string | 'data-amp-track-' | Allow data attributes to be collected in event property. |
amplitude.add(plugin);
amplitude.init('API_KEY');
FAQs
Unknown package
The npm package @amplitude/plugin-network-capture-browser receives a total of 244,645 weekly downloads. As such, @amplitude/plugin-network-capture-browser popularity was classified as popular.
We found that @amplitude/plugin-network-capture-browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 21 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.