Skip to content
×

Custom Events

Create custom events to track specific interactions

GA4 Tracking
Use with AI

Use with AI

Ready-made prompts Connect your AI to Pasilobus Install the CLI

This page

View as MarkdownPlain text of this page Open in ClaudeAsk about this page Open in ChatGPTAsk about this page

Ready-made prompts

Fill in the parts in angle brackets, then paste into any assistant.

Step by step on your store

Read https://help.pasilobus.com/google-analytics/custom-events.md. Walk me through custom events in GA4 Tracking for my store, step by step. My theme is <theme name> and I want <what you want to happen>.

Ask your own question

Read https://help.pasilobus.com/google-analytics/custom-events.md. Answer this about GA4 Tracking on my store: <your question>.

Ask Shopify Sidekick

In your Shopify admin, ask Sidekick about GA4 Tracking. It searches these guides.

Connect your AI to Pasilobus Beta

Our MCP server lets Claude, ChatGPT, OpenClaw and other MCP clients use your Pasilobus apps. It is in beta and open to every Pasilobus account: you sign in with it when your assistant asks. Tools that change your store are marked as changes, so your assistant asks you first.

https://cloud.pasilobus.com/mcp

In Claude Code, add it, then run /mcp to sign in:

claude mcp add --transport http pasilobus https://cloud.pasilobus.com/mcp

In Claude on the web or desktop, go to Customize › Connectors › Add custom connector and paste the address. In ChatGPT, OpenClaw or another client, add it as a custom connector (MCP) with the same address.

Install the CLI

npm install -g pasilobus

Run your apps from the terminal or a coding agent. These only read, so they are safe to try:

pasilobus google-analytics conversions

Purchases sent to Google Analytics, revenue, and orders GA4 could not see

pasilobus google-analytics tracking

GA4 measurement ID, tracked events, Google tags, custom events and tracking features

pasilobus apps lists your apps on the store; pasilobus <app> help lists what each app can do. How it works

On this page
  1. What Are Custom Events?
  2. Creating a Custom Event
  3. Event Configuration Options
  4. Example: Track Newsletter Signups
  5. Example: Track Size Guide Views
  6. Testing Custom Events
  7. Event Naming Best Practices
  8. Managing Custom Events

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.

Support

Talk to a person.

The people who build our apps answer support themselves. Email us, or send a request from your Pasilobus account, and a person replies, usually within one business day. There's no chat.