feat(analytics): enhance Google Analytics with privacy compliance and comprehensive tracking

- Add automatic route change tracking for SPA navigation
- Implement Cookie consent banner for GDPR compliance
- Add performance tracking (LCP, FID, CLS Web Vitals)
- Add outbound link click tracking
- Integrate contact form submission tracking with conversion events
- Add CTA button click tracking in hero section
- Integrate error tracking in ErrorBoundary component
- Extend analytics utility library with 15+ tracking functions
- Configure IP anonymization and privacy settings
- Remove unused test files and deployment scripts
- Update case studies to include only specified cases
- Fix mobile navigation active state issues
- Fix lint errors in test files and components

BREAKING CHANGE: Google Analytics now requires user consent before tracking
This commit is contained in:
张翔
2026-04-22 07:19:29 +08:00
parent b117372b03
commit 2f45818724
45 changed files with 652 additions and 2293 deletions
+8 -8
View File
@@ -113,10 +113,10 @@ describe('Constants', () => {
expect(softwareService?.title).toBe('软件开发');
});
it('should have cloud service', () => {
const cloudService = SERVICES.find(s => s.id === 'cloud');
expect(cloudService).toBeDefined();
expect(cloudService?.title).toBe('云服务');
it('should have consulting service', () => {
const consultingService = SERVICES.find(s => s.id === 'consulting');
expect(consultingService).toBeDefined();
expect(consultingService?.title).toBe('技术咨询');
});
it('should have data service', () => {
@@ -125,10 +125,10 @@ describe('Constants', () => {
expect(dataService?.title).toBe('数据分析');
});
it('should have security service', () => {
const securityService = SERVICES.find(s => s.id === 'security');
expect(securityService).toBeDefined();
expect(securityService?.title).toBe('信息安全');
it('should have solutions service', () => {
const solutionsService = SERVICES.find(s => s.id === 'solutions');
expect(solutionsService).toBeDefined();
expect(solutionsService?.title).toBe('解决方案');
});
it('should have features as array', () => {