# Custom events

> Create custom events to track specific interactions

Source: https://help.pasilobus.com/google-analytics/custom-events
App: GA4 Tracking (on the Shopify App Store as "Pasilobus Google Analytics")
Shopify App Store: https://apps.shopify.com/pasilobus-google-analytics
App help: https://help.pasilobus.com/google-analytics
Section: Features
Last updated: 2026-02-08
Support: email support@pasilobus.com or send a request from https://cloud.pasilobus.com/support (no chat)

Custom events are part of the **Max** plan. On other plans the Custom Events page shows the events you already have, and you can delete them, but adding or editing needs Max.

## What Are Custom Events?

While standard events track the buying journey (view, cart, purchase), custom events let you track other important interactions:

- Newsletter signup button clicks
- Video plays
- Download button clicks
- Social media link clicks
- Banner or promotion clicks
- FAQ accordion opens
- Size guide views

These events appear in GA4 alongside your standard ecommerce events.

## Creating a Custom Event

1. Open the Pasilobus Google Analytics app
2. Open **Custom Events** in the app menu
3. Click **Add Event**
4. Configure your event (see options below)
5. Click **Save**

The event is live on your storefront as soon as it is saved. Reload a storefront page to see it. Custom events are sent after Google's tag has loaded, so they reach GA4 like your page views do.

## Event Configuration Options

### Event Name

The name that appears in GA4 (e.g., `newsletter_signup`). Use lowercase with underscores.

### Event Type

Choose when the event should fire:

| Type | Use Case |
|------|----------|
| **Page Visit** | Track when customers visit specific pages |
| **Click** | Track button or link clicks |
| **Form Submission** | Track form completions |
| **Scroll Depth** | Track when a shopper scrolls past a share of the page. Set **Value** to the percentage (default 50) |

### Category, Action, Label and Value (Optional)

GA4 only needs the event name. Category, Action and Label are sent as event parameters when you fill them in; leave them blank if your reports do not use them. Value is sent as the event's `value` (for Scroll Depth it is the percentage).

### Page Path (Optional)

Limit the event to specific pages. Leave blank to track on all pages.

**Wildcard support**: Use `*` to match any characters in the URL path.

| Pattern | Matches |
|---------|---------|
| `/collections/*` | Any collection page |
| `/products/*` | Any product page |
| `/pages/faq` | Only the FAQ page |
| `/blogs/*/tagged/*` | Blog posts with specific tags |

### Element Selector (for Click and Form events)

Tell the app which element to track using CSS selectors:

| Selector Type | Example | Tracks |
|---------------|---------|--------|
| ID | `#newsletter-form` | Element with id="newsletter-form" |
| Class | `.signup-button` | Elements with class="signup-button" |
| Data attribute | `[data-action="subscribe"]` | Elements with that data attribute |
| Tag + class | `button.add-to-wishlist` | Button elements with that class |

**Tip**: Right-click an element in your browser, select "Inspect", and look for unique IDs or classes.

## Example: Track Newsletter Signups

1. **Event Name**: `newsletter_signup`
2. **Event Type**: Click
3. **Page Path**: Leave blank (track on all pages)
4. **Element Selector**: `.newsletter-submit-button`

## Example: Track Size Guide Views

1. **Event Name**: `size_guide_view`
2. **Event Type**: Click
3. **Page Path**: `/products/*` (only on product pages)
4. **Element Selector**: `[data-action="size-guide"]`

## Testing Custom Events

After creating a custom event:

1. Open your store in a new tab
2. Navigate to a page where the event should fire
3. Perform the action (click the button, visit the page, etc.)
4. Check GA4's **DebugView** (Admin > DebugView) to see the event in real-time

If the event doesn't fire, double-check your element selector and page path match the actual page.

## Event Naming Best Practices

- Use lowercase with underscores: `newsletter_signup` not `NewsletterSignup`
- Be descriptive: `video_play` is better than `click1`
- Be consistent: Use the same naming pattern across all custom events
- Avoid spaces and special characters

## Managing Custom Events

From the Custom Events page, you can:

- **Edit**: Update the configuration
- **Delete**: Remove events you no longer need. A deleted event stops firing on your storefront.

There's no limit to the number of custom events you can create.
