Referencia rápida de sintaxis para las bibliotecas más populares de analítica web y seguimiento de producto en el cliente.
Mixpanel
mixpanel.identify('284');
mixpanel.people.set({ $email: '[email protected]' });
mixpanel.register({ age: 28, gender: 'male' }); /* definir superpropiedades comunes */
mixpanel.track('Signed Up', {
'Signup Type': 'Referral'
});
Consulta: Documentación de Mixpanel JavaScript SDK
Google Analytics (analytics.js)
ga('create', 'UA-XXXX-Y', 'auto');
ga('create', 'UA-XXXX-Y', { userId: 'USER_ID' });
ga('send', 'pageview');
ga('send', 'pageview', { 'dimension15': 'My custom dimension' });
Consulta la guía dedicada: Hoja de referencia de API heredadas de Google Analytics