
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
workbox-google-analytics
Advanced tools
Queues failed requests and uses the Background Sync API to replay them when the network is available
The workbox-google-analytics package is a module within the Workbox suite that helps you integrate Google Analytics into your service worker. It allows you to automatically track offline Google Analytics events and send them when the user comes back online.
Offline Google Analytics
This feature allows you to automatically track Google Analytics events even when the user is offline. The events are stored and sent to Google Analytics when the user comes back online.
import { initialize } from 'workbox-google-analytics';
initialize();
Custom Cache Name
You can specify a custom cache name for storing Google Analytics events. This is useful if you want to manage the cache more granularly.
import { initialize } from 'workbox-google-analytics';
initialize({
cacheName: 'custom-google-analytics-cache'
});
Parameter Customization
This feature allows you to customize the parameters sent with each Google Analytics hit. For example, you can add a custom dimension to indicate that the hit was sent while offline.
import { initialize } from 'workbox-google-analytics';
initialize({
parameterOverrides: {
cd1: 'offline'
}
});
The sw-offline-google-analytics package is another library that helps you integrate Google Analytics with service workers. It provides similar functionality to workbox-google-analytics, such as tracking offline events and sending them when the user is back online. However, it is not part of the Workbox suite and may require more manual setup.
The offline-plugin is a webpack plugin that provides offline support for web applications. It includes a feature for integrating with Google Analytics to track offline events. While it offers broader offline capabilities beyond just Google Analytics, it may be more complex to configure compared to workbox-google-analytics.
This module's documentation can be found at https://developers.google.com/web/tools/workbox/modules/workbox-google-analytics
FAQs
Queues failed requests and uses the Background Sync API to replay them when the network is available
The npm package workbox-google-analytics receives a total of 4,006,715 weekly downloads. As such, workbox-google-analytics popularity was classified as popular.
We found that workbox-google-analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.