feat: hotjar
This commit is contained in:
parent
e95a435108
commit
59e04fedc7
@ -122,25 +122,25 @@
|
|||||||
|
|
||||||
// Custom events for QR Rapido
|
// Custom events for QR Rapido
|
||||||
window.trackQRGeneration = function(type, time, isPremium) {
|
window.trackQRGeneration = function(type, time, isPremium) {
|
||||||
gtag('event', 'qr_generated', {
|
gtag('event', 'qr_generated', {
|
||||||
'event_category': 'QR Generation',
|
'event_category': 'QR Generation',
|
||||||
'event_label': type,
|
'event_label': type,
|
||||||
'value': Math.round(parseFloat(time) * 1000),
|
'value': Math.round(parseFloat(time) * 1000),
|
||||||
'custom_parameters': {
|
'custom_parameters': {
|
||||||
'generation_time': parseFloat(time),
|
'generation_time': parseFloat(time),
|
||||||
'user_type': isPremium ? 'premium' : 'free',
|
'user_type': isPremium ? 'premium' : 'free',
|
||||||
'speed_category': time < 1.0 ? 'ultra_fast' : time < 2.0 ? 'fast' : 'normal'
|
'speed_category': time < 1.0 ? 'ultra_fast' : time < 2.0 ? 'fast' : 'normal'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.trackSpeedComparison = function(ourTime, competitorAvg) {
|
window.trackSpeedComparison = function(ourTime, competitorAvg) {
|
||||||
gtag('event', 'speed_comparison', {
|
gtag('event', 'speed_comparison', {
|
||||||
'event_category': 'Performance',
|
'event_category': 'Performance',
|
||||||
'our_time': parseFloat(ourTime),
|
'our_time': parseFloat(ourTime),
|
||||||
'competitor_avg': parseFloat(competitorAvg),
|
'competitor_avg': parseFloat(competitorAvg),
|
||||||
'speed_advantage': parseFloat(competitorAvg) - parseFloat(ourTime)
|
'speed_advantage': parseFloat(competitorAvg) - parseFloat(ourTime)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.trackLanguageChange = function(from, to) {
|
window.trackLanguageChange = function(from, to) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user