Custom
Runs your script, or taps something on your page for you.
A Custom Button does something rather than going somewhere. Use it when none of the other types fit — to run a piece of JavaScript, or to put a native button in the bar that triggers a control already on your web page.
Add one
On the screen's Navigation bar tab, click + Add, then choose Custom Button.

Button Actions comes first, because it changes the rest of the form.
Execute Script
Runs JavaScript on the current page each time the button is tapped.
Button Icon*
Choose a supplied icon or upload an image.
Script*
The JavaScript to run.
The script runs against the page the customer is looking at, exactly as if you had typed it into a browser console on that page. It can read the page, change it, or call a function your site already defines.
Web Page Element Click
Taps an element on your page for you.
Button Icon*
Choose a supplied icon or upload an image.
Element's identifier*
The class or id of the element to click.
This is the simpler and more reliable of the two, and it covers the common case: you already have a working search button, filter or menu toggle on your site, and you want a native button in the bar that triggers it.
Find the identifier the same way as the cart counter — right-click the control on your site, choose Inspect, and read its class or id.
Visibility and analytics
Both actions also offer:
Visibility → User — All, logged-in only, or logged-out only.
Analytics → Enable Firebase Analytics (Premium) — records an event on each tap.
Click Add, then Save as draft.
Last updated