Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ function trackXEvent(eventId: string, metadata?: Record<string, any>) {
if (typeof window !== 'undefined' && window.twq) {
try {
if (metadata) {
window.twq('track', eventId, metadata);
window.twq('event', eventId, metadata);
} else {
window.twq('track', eventId);
window.twq('event', eventId, {});
}
} catch (error) {
console.warn('X Pixel tracking failed:', error);
Expand Down Expand Up @@ -163,7 +163,7 @@ export function trackExploreTabViewed() {
trackRedditConversion('ViewContent');

// Track as ViewContent event on X
trackXEvent('tw-r9lkr-rbs61');
trackXEvent('tw-r9lkr-rbtjq'); // Custom event - Explore Tab Viewed
trackXConversion('ViewContent');
}

Expand All @@ -181,7 +181,7 @@ export function trackQueryRun(resultCount: number, shouldTrackReddit: boolean =
trackRedditConversion('Search');

// Track as Search event on X
trackXEvent('tw-r9lkr-138c4u');
trackXEvent('tw-r9lkr-rbtjr'); // Custom event - User Search
trackXConversion('Search');
}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ export function trackGenotypeFileLoaded(fileSize: number, variantCount: number)
});

// Track as Lead event on X
trackXEvent('tw-r9lkr-138c4w', {
trackXEvent('tw-r9lkr-rbtjs', { // Custom event - DNA File Upload
conversion_id: conversionId,
});
trackXConversion('Lead', {
Expand Down Expand Up @@ -273,7 +273,7 @@ export function trackUserLoggedIn() {
});

// Track as SignUp event on X
trackXEvent('tw-r9lkr-138c4x', {
trackXEvent('tw-r9lkr-rbtjt', { // Custom event - User login
conversion_id: conversionId,
});
trackXConversion('SignUp', {
Expand Down Expand Up @@ -341,7 +341,7 @@ export function trackSubscribedWithCreditCard(durationDays: number) {
});

// Track as Purchase event on X
trackXEvent('tw-r9lkr-138c4y', {
trackXEvent('tw-r9lkr-rbtju', { // Correct Pixel ID
conversion_id: conversionId,
value: value.toFixed(2),
currency: 'USD',
Expand Down Expand Up @@ -379,7 +379,7 @@ export function trackSubscribedWithStablecoin(durationDays: number) {
});

// Track as Purchase event on X
trackXEvent('tw-r9lkr-138c4y', {
trackXEvent('tw-r9lkr-rbtju', { // Correct Pixel ID
conversion_id: conversionId,
value: value.toFixed(2),
currency: 'USD',
Expand Down
40 changes: 0 additions & 40 deletions localdata/gwas_catalog.sql

This file was deleted.

Loading