Devlog 9: Adding Analytics Without Being Creepy About It
I've been flying blind for weeks. I know people are using Tuggy (the vote counts don't lie), but I have no idea how they're using it. Are they on mobile? Desktop? Do they vote once and leave, or do they stick around? Are the upgrades even being used?
I need analytics, but I also don't want to be one of those apps that tracks every pixel you hover over and sells your data to advertisers.
What I'm Actually Tracking
I'm using Google Analytics 4, but only tracking stuff that actually helps me improve the product:
Voting behavior:
trackEvent('vote_cast', {
matchup_id: matchup.id,
side: voteSide,
vote_count: voteAmount,
user_type: isAuthenticated ? 'authenticated' : 'anonymous'
});
Upgrade purchases:
trackEvent('upgrade_purchased', {
upgrade_type: upgrade.type,
cost: upgrade.cost,
session_duration: sessionTime
});
Matchup creation:
trackEvent('matchup_created', {
has_custom_images: Boolean(imageA && imageB),
creation_time: timeToCreate
});
That's pretty much it. I'm not tracking individual users across the web, building profiles, or doing any of that creepy stuff.
Privacy Settings
I configured GA4 to be as privacy-respecting as possible:
gtag('config', GA_MEASUREMENT_ID, {
anonymize_ip: true,
allow_google_signals: false,
allow_ad_personalization_signals: false
});
This turns off all the tracking features that enable cross-site profiling and ad targeting. Google probably hates me for it, but I sleep better.
Cookie Consent
I added a simple cookie banner that lets people opt out of analytics entirely. If they decline, the analytics scripts don't load at all:
function setAnalyticsConsent(granted: boolean) {
gtag('consent', 'update', {
analytics_storage: granted ? 'granted' : 'denied',
ad_storage: granted ? 'granted' : 'denied'
});
}
About 70% of people accept, 30% decline. That's fine. I'd rather have honest opt-in numbers than sneakily track everyone.
What I've Learned So Far
Even with limited tracking, the insights have been valuable:
- 78% of votes come from mobile (good thing I fixed that touch delay)
- Average session is 4.5 minutes (longer than I expected!)
- 25% of active users buy upgrades (the idle system is working)
- Peak traffic is 6-9 PM local time (makes sense, people browsing after work)
The most surprising finding: people share matchups way more than I thought. About 40% of traffic comes from social shares. That's huge for growth.
Performance Monitoring
I'm also tracking Core Web Vitals to catch performance regressions:
function reportWebVitals({ name, value, rating }: Metric) {
trackEvent('web_vitals', {
metric_name: name,
value: Math.round(value),
rating: rating
});
}
This already caught one regression where I accidentally made the particle system way too heavy and tanked frame rates on older phones.
AdSense Prep
I'm eventually planning to add ads (I need to pay for hosting somehow), and Google AdSense requires certain engagement metrics. The analytics data shows I'm hitting their thresholds:
- Average session: 4.5 minutes ✓
- Pages per session: 2.8 ✓
- Bounce rate: 42% ✓
- Return visitor rate: 31% ✓
So when I'm ready to monetize, I should be able to get approved.
My Philosophy
I think you can have analytics without being invasive. The key is:
- Only track what actually helps you improve the product
- Give users real control (not dark patterns)
- Don't sell or share data with third parties
- Be transparent about what you're collecting
Analytics are a tool, not a surveillance system. Treat them that way.
Next week I'm tackling deployment and getting this thing live on a real domain.