![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@visual-framework/vf-analytics-google
Advanced tools
Supplementary behaviour (primarily JavaScript) to ease tracking with Google Analytics.
This component tracks three types of user engagement as actions in Google Analytics:
a
button
details
input
select
textarea
label
zip|exe|pdf|doc*|xls*|ppt*|mp3|txt|fasta
mailto:
Explicit labels can be provided with data attributes:
data-vf-analytics-label="A special label"
Track dimensions:
<meta name="vf:page-type" content="category;pageTypeHere">
How to add dimension to your property?
You can track the region of the page where an event occurs:
<div data-vf-google-analytics-region="main-content-area-OR-SOME-OTHER-NAME">
<a href="//www.example.com">My link here</a>
</div>
Notes:
<body data-vf-google-analytics-verbose="true">
You should import this component in ./components/vf-component-rollup/scripts.js
or your other JS process:
import { vfGaIndicateLoaded } from 'vf-analytics-google/vf-analytics-google';
// Or import directly
// import { vfGaIndicateLoaded } from '../components/raw/vf-analytics-google/vf-analytics-google.js';
let vfGaTrackOptions = {
vfGaTrackPageLoad: true,
vfGaTrackNetwork: {
serviceProvider: 'dimension2',
networkDomain: 'dimension3',
networkType: 'dimension4'
}
};
vfGaIndicateLoaded(vfGaTrackOptions);
vfGaIndicateLoaded()
is the primary function and awaits and checks to see if Google Analytics client side JS has loaded. If it does, sets <body data-vf-google-analytics-loaded='true'>
vfGaIndicateLoaded()
accepts these options for object vfGaTrackOptions
:
vfGaTrackOptions.vfGaTrackPageLoad
(defaults to true).
vfGaTrackOptions.vfGaTrackNetwork
Utility method to invalidate prior GA check <body data-vf-google-analytics-loaded='false'>
Can be used to directly track events if you wish to use your own event handler.
/**
* This code tracks the user's clicks in various parts of the site and logs them as GA events.
*
* Dev note:
* add class verbose-analytics to your body for a readout to console on clicks.
*
* @param {element} actedOnItem
* @param {string} customEventName Event action
* @example
* jQuery(".analytics-content-footer").on('mousedown', 'a, button', function(e) {
* vfGaTrackInteraction(e.target,'Content footer');
* });
* /
This repository is distributed with npm. After installing npm, you can install vf-analytics-google
with this command.
$ yarn add --dev @visual-framework/vf-analytics-google
FAQs
vf-analytics-google component
We found that @visual-framework/vf-analytics-google demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.