
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@widergy/web-utils
Advanced tools
Utility GO! Web Utils
Se utiliza desde Frontend Web, mediante Google Analytics 4, para recoger datos de los sitios web y comprender mejor el recorrido del cliente.
initializeGA(analyticsTrackingId, options)
Se encarga de inicializar analytics.
analyticsTrackingId
: Google Analytics Tracking ID.options
: Objeto de configuración custom para Analytics.
{ gaOptions: { name: ANALYTICS_TRACKER }, alwaysSendToDefaultTracker: false }
options
, se usará como default{ titleCase: false }
sendGAEvent(category, action, label, value)
Se utiliza para enviar eventos.
category
: Categoría del evento.action
: Acción del evento.label
: Label del evento.value
: Valor del evento.Por ejemplo, si se quiere enviar un evento sobre una recarga prepaga exitosa:
sendGAEvent('Cobranzas', 'Generación de carga prepago', 'WDRG | Valor agregado | -OK- |', '1850')
sendGAPageView(pathname)
Se utiliza para trackear cambios de página.
pathname
: URL de la página a trackear.Ejemplo:
sendGAPageView(ROUTES.BALANCE_TO_PAY);
setGAUserId(userId)
Se utiliza para setear el id de usuario.
userId
: ID del usuarioEjemplo:
setGAUserId(getState().user.currentUser.id);
createMiddleware(eventDataDefinition)
Se utiliza para crear un middleware que intercepte acciones de redux y envíe eventos de analytics.
eventDataDefinition
debe ser un diccionario de tipo de acción - función.const eventDataDefinition = {
actionType: function
}
Por ejemplo:
const eventDataDefinition = {
[paymentActions.PREPAID_PAYMENT_REQUEST_FAILURE]: prepaidPaymentRequestFailure
}
Cada uno de estas funciones, al ejecutarse, debe devolver los valores a usar en el trackeo de eventos.
const function = action => ({
category,
action,
label,
value
});
Por ejemplo:
const prepaidPaymentRequestFailure = action => ({
category: categories.COBRANZAS,
action: actions.GENERACION_DE_CARGA_PREPAGO_ERRONEA,
label: `${labels.GENERACION_DE_PAGO_ERROR} ${action.payload}`,
value: Math.round(action.totalAmount)
});
FAQs
Utility GO! Web utils
The npm package @widergy/web-utils receives a total of 115 weekly downloads. As such, @widergy/web-utils popularity was classified as not popular.
We found that @widergy/web-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.