Skip to content

Commit e490379

Browse files
Merge pull request #56 from thefirehacker/3.6.0_Voice_DeepResearchPlayground_Integration
G4A FIX
2 parents abf5770 + 43230a8 commit e490379

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

config.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ class Config {
356356

357357
// Track key events (Connect buttons, etc.)
358358
trackKeyEvent(eventName, location, additionalData = {}) {
359+
console.log('🔍 trackKeyEvent called:', eventName, location, additionalData);
359360
this.trackEvent(eventName, 'key_events', location, 1, {
360361
event_timestamp: Date.now(),
361362
user_engagement: true,
@@ -437,5 +438,24 @@ class Config {
437438
}
438439
}
439440

440-
// Create global config instance
441-
window.AppConfig = new Config();
441+
// Create global config instance with error handling
442+
try {
443+
window.AppConfig = new Config();
444+
console.log('✅ Config instance created successfully');
445+
console.log('🔍 Available methods:', Object.getOwnPropertyNames(Object.getPrototypeOf(window.AppConfig)));
446+
} catch (error) {
447+
console.error('❌ Error creating Config instance:', error);
448+
// Create a fallback object
449+
window.AppConfig = {
450+
initializeGA4: () => console.log('📊 Fallback GA4 init'),
451+
trackKeyEvent: () => console.log('📊 Fallback trackKeyEvent'),
452+
trackEvent: () => console.log('📊 Fallback trackEvent'),
453+
trackPageView: () => console.log('📊 Fallback trackPageView'),
454+
trackNavigation: () => console.log('📊 Fallback trackNavigation'),
455+
trackModal: () => console.log('📊 Fallback trackModal'),
456+
trackAIInteraction: () => console.log('📊 Fallback trackAIInteraction'),
457+
trackDocumentOperation: () => console.log('📊 Fallback trackDocumentOperation'),
458+
trackResearchOperation: () => console.log('📊 Fallback trackResearchOperation'),
459+
trackChatInteraction: () => console.log('📊 Fallback trackChatInteraction')
460+
};
461+
}

0 commit comments

Comments
 (0)