Skip to content

Conversation

@Chardonneaur
Copy link

Summary

This PR adds a new Regex Event Trigger that fires on custom events matching a configurable regex pattern.

Features

  • Configurable regex pattern field (default: .* matches all events)
  • Skips internal Matomo events (mtm.*)
  • Replays missed events that occurred before the container fully loaded
  • Compatible with the built-in {{Event Name}} variable to access the triggering event name

Example Patterns

Pattern Description
.* Match all events
^form_ Events starting with 'form_'
click|submit Events containing 'click' or 'submit'
^(purchase|checkout)$ Exactly 'purchase' or 'checkout'

Files Added

  • Template/Trigger/RegexEventTrigger.php - PHP trigger class
  • Template/Trigger/RegexEventTrigger.web.js - JavaScript implementation
  • images/RegexEventTrigger.svg - Trigger icon
  • Updated lang/en.json with translations

Screenshot

The trigger appears in the "Others" category and provides a text field for entering the regex pattern.


🤖 Generated with Claude Code

A new trigger that fires on custom events matching a regex pattern.

Features:
- Configurable regex pattern field (default: .* matches all events)
- Skips internal Matomo events (mtm.*)
- Replays missed events from before container load
- Use {{Event Name}} variable to access the triggering event

Example patterns:
- .* (all events)
- ^form_ (events starting with 'form_')
- click|submit (events containing 'click' or 'submit')
- ^(purchase|checkout)$ (exactly 'purchase' or 'checkout')

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant