Englewood Health calendar page

Custom Eventbrite Integration

Check it out 

Custom Eventbrite Integration

The problem

  • The organization offers a variety of event and classes, some requiring registration or payment, others requiring neither.
  • A low-cost platform for collecting registrations and, in some cases, fees was needed.
  • It was determined that Eventbrite best fit the organization’s needs, but the platform does not accommodate event listings that do not require registration/ticketing.
  • The challenge was to create an online calendar that would display information from two sources:
    • Eventbrite, where events requiring registration or payment would be entered; and
    • A second database containing information on non-registration events.

The solution

  • To accommodate non-registration events, I created a custom post type in the website’s WordPress CMS with custom fields for the relevant information.
  • To integrate those events with the ones in Eventbrite, I built a WordPress plugin to pull data from Eventbrite and then merge both sources for unified frontend output.

How it works

  • The plugin hits the Eventbrite API once per hour (scheduled cron job run in the background to prevent any pageload delays) and fetches all the organization’s event data at once, storing it in the WordPress options table.
  • Because Eventbrite’s built-in categorization didn’t meet the organization’s needs, I built an admin utility to review events pulled in from the API and categorize them using WordPress taxonomy. The utility also allows the admin to see when the next scheduled Eventbrite data refresh will take place and to manually refresh the data if desired.
  • When the website’s calendar page is requested, both types of events are combined in an array of identical event objects, merging multi-date events, and checking against the current time to drop events that have ended. The array is sorted by date/time and filtered as needed.
  • WordPress rewrite rules are used to display Eventbrite pages on the organization site, with registration widget embedded, so the user never has to leave the site. The UI/UX is identical for events from both sources.

Technologies


Related

Englewood Health solr integration screenshot

Custom Solr Implementation

A solution for extending WordPress's built-in sitewide search to return data from multiple sources.
Reaching New Heights - A 5-Year Progress Report website screenshot

5-Year Progress Report Website

A single-page digital publication launched to coincide with a rebranding initiative.