In this example code, we define an action shortcut
to trigger events to Google Analytics on specified element events (submit
, click
, etc.)
git clone [email protected]:BuilderIO/builder.git
cd builder/plugins/example-action-plugin/
npm install
npm run start
then configure Builder to load this plugin from localhost:
You should be able to see this example in action.
Action shortcuts in Builder are a great way to simplify some of the tasks that would otherwise require developer involvement, using action shortcuts a content creator can trigger tracking events, set up conditional values, or set specific values on state without having to write code, see src/plugin.tsx
for a detailed example.