PHP OAuth

Enhancing User Notifications and Campaign Tracking in Landing

Introduction

The landing project is focused on providing users with a streamlined experience. Recent efforts have concentrated on improving user notifications related to GitHub organization OAuth restrictions and enabling enhanced tracking for campaign emails.

GitHub Org OAuth Restriction Notifications

When a repository becomes blocked due to organizational OAuth restrictions, it's crucial to promptly notify the affected users. This enhancement involves sending a Filament database notification that includes a direct link to the organization's settings. To prevent redundant notifications, a caching mechanism ensures that notifications are deduplicated within a specified time window.

Campaign Email Tracking

To gain better insights into the effectiveness of email campaigns, Mailgun open and click tracking has been enabled. This allows for monitoring user engagement with campaign emails through the o:tracking-opens and o:tracking-clicks options.

To streamline the configuration of Mailgun webhooks, an Artisan command (app:configure-mailgun-webhooks) has been added. This command simplifies the setup process, reducing the potential for manual errors and ensuring consistent configuration.

Localization

To support a global user base, the new org_blocked notification has been localized into multiple languages, including English (en), Spanish (es), French (fr), and German (de). This ensures that users receive notifications in their preferred language.

Testing

Comprehensive tests have been added to verify the functionality of both the organization blocked notification and the campaign tracking options. These tests ensure the reliability and accuracy of these features.

// Example of sending a notification
use Illuminate\Support\Facades\Notification;

class RepoBlockedNotification extends Notification
{
    public function toDatabase($notifiable)
    {
        return [
            'message' => 'Your repository has been blocked due to organization OAuth restrictions.',
            'link' => 'https://example.com/org/settings', // Replace with the actual URL
        ];
    }
}

// Usage
$user = User::find(1);
Notification::send($user, new RepoBlockedNotification());

Conclusion

These enhancements provide users with timely notifications about GitHub organization OAuth restrictions and enable enhanced tracking for campaign emails, contributing to a better overall experience on the landing platform.

Enhancing User Notifications and Campaign Tracking in Landing
GERARDO RUIZ

GERARDO RUIZ

Author

Share: