Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@bolt/analytics-autolink
Advanced tools
Adds Google Analytics tracking support to the Bolt Design System.
Helper library to automatically applies GA autolink click tracking query strings to Bolt components that point to external domains.
npm install @bolt/analytics-autolink
.boltrc.js
config:module.exports = {
components: {
global: [
'@bolt/analytics-autolink',
//...
]
}
}
// ex. main.js
import '@bolt/analytics-autolink';
//
For example, a typical GA config might look similar to this:
<head>
<script src="https://www.google-analytics.com/analytics.js" async></script>
<script>
// replace with your own GA tracking #
const TRACKING_ID = 'UA-123456789-0';
// prep GA data if it doesn't yet exist
window.ga = window.ga || ((...args) => (ga.q = ga.q || []).push(args));
ga('create', TRACKING_ID, 'auto', { allowLinker: true });
ga('send', 'pageview');
ga('set', 'transport', 'beacon');
ga('require', 'linker');
// See Step 3 below on configuring which domains to track
// window.bolt = window.bolt || {};
// window.bolt.analytics = window.bolt.analytics || {};
// window.bolt.analytics.autolink = window.bolt.analytics.autolink || {
// domains: ['google.com'] // domains to configure
// };
// ga('linker:autoLink', window.bolt.analytics.autolink.domains);
</script>
Option 1. Via a global Bolt config. For example:
<script>
window.bolt = window.bolt || {};
window.bolt.autolink = {
domains: ['google.com'], // domains to track
};
// make sure GA's linker:autoLink points to the domains configured
ga('linker:autoLink', window.bolt.autolink.domains);
</script>
Option 2. This can also be configured via a Drupal config. For example:
<script>
window.drupalSettings = {
google_analytics: {
trackCrossDomains: ['pega.com'], // domains to track
},
};
// make sure GA's linker:autoLink points to the domains configured
ga('linker:autoLink', window.drupalSettings.google_analytics.trackCrossDomains);
</script>
FAQs
Adds Google Analytics tracking support to the Bolt Design System.
The npm package @bolt/analytics-autolink receives a total of 373 weekly downloads. As such, @bolt/analytics-autolink popularity was classified as not popular.
We found that @bolt/analytics-autolink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.