Event Live Text Marquee

Show a scrolling text marquee that reacts to real-time events.

Intermediate Last updated: 13 Nov 2025

About


In this example, we show a scrolling text marquee. When a customer purchases tickets to an event, the marquee text updates for all site visitors. After a short delay, it returns to its original message.

Before you begin


  • To use this example, install Wix Events on your site and set up at least one event with ticketing.
  • This example requires a published, live site for the Wix Events order-confirmed hook to run.
  • This example requires Wix Studio Premium.

APIs


How we built it


We added the following to our site:

Page Elements

  • A Text Marquee on the home page displaying default promotional text.

Frontend Code

Home

The code in this file listens for real-time messages from a channel. When a message is received, it temporarily changes the text marquee.

In this file, we:

  • Subscribe to a realtime channel named new-ticket-purchases.
  • On receiving a message from the channel, change the marquee’s text.
  • Wait for 15 seconds, then restore the original text.

Backend Code

realtime-permissions.js

The code in this file defines security rules for realtime channels.

In this file, we:

  • Set a default permissions router for all channels. The router gives all subscribers read access to channels.
  • Export a function that checks a subscriber’s permissions for a specific channel by calling the permissions router.
events.js

The code in this file listens for live order confirmations from Wix Events, and publishes a message on the new-ticket-purchases channel when a ticket is purchased.

In this file, we:

  • Define a channel object with the same name that was defined on the home page.
  • Set a callback function as an event handler that Wix calls automatically when an order is confirmed. Inside the handler:
    • Publish the purchased item name as the payload.
    • Log “Message Published” on success and handle errors if publishing fails.

Code Snippets


events.js
Copy
realtime-permissions.js
Copy
Home
Copy

Get Help


Join the community

Join the Wix Studio community on Discord, where experienced developers and fellow creators come together to share tips, troubleshoot issues, and collaborate.

Hire a developer

Building a coded solution on your own can be challenging. Let an experienced Wix developer build it for you, so you can keep working on your site or business. Visit the Wix Marketplace to find a trusted developer.

Did this help?