Skip to main content

Custom Events

Track specific interactions like newsletter signups, video plays, and button clicks. Available on the Premium plan.

Updated over 2 weeks ago

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. Scroll to the Custom Events section

  3. Click Add Custom Event

  4. Configure your event (see options below)

  5. Click Save

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

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 section, you can:

  • Edit: Update the configuration

  • Delete: Remove events you no longer need

  • Disable: Temporarily stop tracking without deleting

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

Did this answer your question?