Notifications

Transactional notification system for delivering alerts about relevant activities, interactions, and events occurring across your platform.

This guide covers the configuration of the Notifications app within UNA Studio, detailing the settings available to Operators to control how, when, and where notifications are delivered. UNA supports three primary notification channels:

  • On-Site: Notifications displayed directly within the website interface (e.g., in a notification center or dedicated page).
  • Email: Notifications sent to users' registered email addresses.
  • Push: Real-time notifications delivered to users' browsers or mobile devices (requires integration with a service like OneSignal), even when they aren't actively on the site.

Accessing Notification Settings

As an Operator, you configure the Notifications app globally via Studio:

  1. Navigate to Studio.
  2. Click on the Notifications app icon in the Launcher.
  3. You will see tabs for Settings, On Site, Email, and Push.

General Settings Tab (Studio > Notifications > Settings)

This tab controls the overall behavior, display, and lifecycle of notifications across all channels.

  • Number of items per page: (Number) Sets how many notifications are displayed on the dedicated notifications page (e.g., yoursite.com/notifications-view). Default is often 12.
  • Number of items in preview: (Number) Controls how many recent notifications appear in the notification popup or dropdown menu (usually accessed from the site header). Default is often 5.
  • Group settings by category: (Checkbox) When enabled, the notification settings page for end-users (in their account settings) will group notification options by category (e.g., "Activity related to you", "Activity by members you follow") for easier management.
  • Group notifications by event: (Checkbox) When enabled, this groups the available notification events within Studio (on the On Site, Email, Push tabs) by category, as seen in the screenshots. Makes Operator configuration more organized.
  • Enable 'clicked' indicator: (Checkbox) Adds a visual indicator (e.g., a subtle background change or dot) to notifications within the user interface after a user clicks on them. Provides visual feedback.
  • Delay before sending Email and/or Push notifications (in seconds): (Number) Introduce a time delay (in seconds) between an event occurring and its corresponding Email or Push notification being sent. 0 means send immediately. A delay can be useful to allow for quick "undo" actions or to prevent rapid-fire notifications for fast interactions.
  • Notification lifetime, in days (0 - no limit): (Number) Sets how many days a notification will be stored before being automatically deleted by the system's cleanup process (cron job). 0 disables automatic deletion based on age. Default is often 90 days.
  • Notify a user about new comments for a content he's previously commented: (Checkbox) If enabled, users who have commented on a piece of content will receive notifications about subsequent new comments on that same content by other users.
  • Treat replies as comments in 'New comments' notification.: (Checkbox) If your site uses a distinct "reply" function within comments, enabling this setting ensures that replies also trigger the standard "New comments" notification type.
  • Number of characters in auto-cropped summary (applied before saving a notification): (Number) Sets the maximum length for automatically generated notification summaries. Longer text from the original event will be truncated. Affects the data stored.
  • Number of characters in auto-cropped author name in notification text: (Number) Limits the length of the author's name displayed within the notification text itself.
  • Number of characters in auto-cropped email notification subject (0 - no limit): (Number) Sets the maximum length for the subject line of email notifications. 0 means no limit.
  • Number of characters in auto-cropped content title in notification text: (Number) Limits the length of the content's title (e.g., post title, group name) displayed within the notification text.
  • Number of characters in auto-cropped push notification message: (Number) Sets the maximum length specifically for the message body of push notifications, often constrained by platform limits.

Remember to click Save after making changes on this tab.

Delivery Channel Configuration (On Site, Email, Push Tabs)

These three tabs share an identical structure and control which specific events trigger a notification for that particular channel.

Common Structure:

  • List of Notification Events: You will see a comprehensive list of potential events that can trigger notifications, grouped by category (if grouping is enabled in Settings). Examples include:
    • Activity related to you: Someone mentions you, New friend request, New follower, Messenger mentions, New comments on your content, Likes/Votes on your content, etc.
    • Activity by members you follow: New comments, New likes, New content, etc.
    • Activity in spaces (groups, events, etc.) you follow: New fans, New join requests, New posts, New content, New comments, etc.
  • Active Toggle (Left): This toggle enables or disables the entire notification event for the selected delivery channel (On Site, Email, or Push). If toggled off (grey), no notifications for this event will ever be sent via this channel, regardless of user settings. If toggled on (green), notifications can be sent via this channel, depending on the user's preferences.
  • Default value Toggle (Right): This toggle sets the initial state of this notification setting for new users when they register, or potentially resets existing users if defaults are reapplied. If on (green), the notification for this event/channel will be enabled by default for users. If off (grey), it will be disabled by default. Crucially, end-users can override this default setting in their personal notification preferences.
  • Event Description: A brief explanation of what triggers the notification.

Key Concepts:

  • Operator Control vs. User Preference: The Active toggle is the Operator's master switch for an event on that channel. The Default value toggle sets the starting point for the user, which they can then change.
  • Consistency: The list of events is generally the same across the On Site, Email, and Push tabs. You configure where each event's notification should potentially go.
  • Module Dependency: The list of available notification events depends on the modules installed and active on your site. If you install a new module that generates notifications, new options may appear here.

Potential Settings Corruption:

  • Symptom: Occasionally, due to module activation/deactivation or updates, a specific setting's value might become corrupted. You may see an alert message like "The setting's value is corrupted. It is recommended to enable/disable it and reload the page." appear next to a toggle.
  • Solution: As the message suggests, simply click the affected toggle (either the 'Active' or 'Default value' one indicated) to switch its state (e.g., from on to off, or off to on), click Save at the bottom, and then reload the Studio page. This usually corrects the corrupted value and resolves the warning. Then set the toggle back to your desired state and save again.

Configuration Steps:

  1. Go through each tab (On Site, Email, Push).
  2. For each notification event listed:
    • Decide if you want this event to ever trigger a notification via this specific channel. Use the Active (left) toggle to enable/disable it system-wide for that channel.
    • Decide if you want this notification to be enabled by default for users. Use the Default value (right) toggle to set the initial state for user preferences.
  3. Click Save at the bottom of each tab after making changes.

Specific Channel Considerations

Push Notifications

  • Requires Provider Setup: Push notifications rely on an external service. UNA has built-in support for OneSignal.
  • Configuration Steps (OneSignal):
    1. Create an account and an App within OneSignal (onesignal.com).
    2. Configure the "Web" platform in your OneSignal App settings (typically using "Custom Code" integration).
    3. Obtain your OneSignal App ID and REST API Key from the OneSignal dashboard (Settings > Keys & IDs).
    4. Enter these keys, along with any required platform-specific IDs (like Safari Web ID), into the Global Settings (Studio > Settings > Global > Push Notifications).
    5. Ensure the Provider is set to 'OneSignal' in Studio > Settings > Global > Push Notifications.
    6. Enable desired events on the Push tab within the Notifications app settings (Studio > Notifications > Push).
  • Refer to the Push Notifications Configuration wiki for detailed OneSignal setup steps.

Email Notifications

  • Template Customization: The content and appearance of email notifications are managed via Studio > Polyglot > Email Templates. You can edit HTML and plain text versions there.
  • Delivery Configuration: Email delivery settings (SMTP server, transactional email provider credentials) are configured in Studio > Settings > Global > Email. Ensure reliable email delivery is set up.

On-Site Notifications

  • Real-time Delivery: Often relies on AJAX polling or a WebSocket connection (configured in Studio > Settings > Global > Sockets Server) for immediate display.
  • User Interface: Displayed in a notification center/popup and potentially a dedicated page. Configuration here primarily involves enabling/disabling events.

User Notification Preferences

It's important to remember that while Operators set the system-wide availability (Active toggle) and defaults (Default value toggle), individual users typically have their own notification settings page (usually accessible via their account settings on the frontend). There, they can override the defaults you set for each event and channel, provided the event is marked as Active for that channel in Studio.

Integration with Modules & Alerts System

Notifications are triggered automatically when specific Alerts (UNA's hook/event system) are fired by different modules. For a notification option to appear and function:

  1. A module must be programmed to fire a relevant alert (e.g., the Posts module fires an alert when a new comment is added).
  2. The Notifications module must have a handler registered to listen for that specific alert.
  3. The Operator must have enabled the corresponding event for at least one delivery channel (Active toggle).

Best Practices

  • Be Selective: Don't enable every single notification type on every channel by default. Overwhelming users leads to them disabling all notifications. Focus on high-value alerts.
  • Prioritize Channels: Consider which channel is most appropriate for each type of notification (e.g., critical alerts via Push/Email, less urgent via On-Site).
  • Review Defaults: Periodically review the Default value settings based on user feedback and engagement patterns.
  • Clear Descriptions: Ensure the event descriptions (managed via Polyglot) are clear so users understand what each notification setting controls.
  • Monitor Performance: Notification generation, especially email/push, can impact performance. Monitor queue processing via Global Settings and server load. Adjust queue limits if needed.

Conclusion

The UNA Notifications app provides Operators with granular control over how community members are informed about site activity. By carefully configuring the general settings and enabling/disabling specific events for On-Site, Email, and Push channels, you can tailor the notification experience to match your community's needs, driving engagement without causing notification fatigue. Remember the distinction between system-wide activation (Active) and user defaults (Default value), and always ensure related services (like OneSignal or Email delivery) are properly configured.

On This Page