statamic-peak
statamic-peak copied to clipboard
[FR] Button/form conversions
It could be cool if Peak’s button and/or form partials shipped with an option to add event codes for Fathom/other tools. This would make it a lot easier to track conversions on key pages etc.
Initial thoughts:
- This wouldn’t add much UX overhead: it could be a section in the
Show controls
toggle - Perhaps it’s possible to add defaults for Fathom/Plausible if either of those are added in the backend (or only enable if a code is added)
Appreciate it might be that some implementations are too custom/involved to add or that it’s generally too difficult as a default...
How about this: https://peak.1902.studio/features/forms.html#success-hook
Does that suit your needs?
It looks like that’s set in the template rather than the CP, is that right? I’m thinking of something where you can set it in the CP on a per button (link or form) basis.
Correct. What I would do is add a field to the form.yaml (page builder fieldset) and put that in the successHook()
.
I like the idea of adding it to buttons as btw. So I'm keeping this open. Thanks.
I added this to buttons. Forms can easily be extended on a per site basis.
Nice – thanks!