statamic-peak icon indicating copy to clipboard operation
statamic-peak copied to clipboard

[FR] Button/form conversions

Open dave-smyth opened this issue 11 months ago • 4 comments

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...

dave-smyth avatar Mar 10 '24 16:03 dave-smyth

How about this: https://peak.1902.studio/features/forms.html#success-hook

Does that suit your needs?

robdekort avatar Mar 10 '24 17:03 robdekort

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.

dave-smyth avatar Mar 10 '24 18:03 dave-smyth

Correct. What I would do is add a field to the form.yaml (page builder fieldset) and put that in the successHook().

robdekort avatar Mar 10 '24 18:03 robdekort

I like the idea of adding it to buttons as btw. So I'm keeping this open. Thanks.

robdekort avatar Mar 10 '24 18:03 robdekort

I added this to buttons. Forms can easily be extended on a per site basis.

robdekort avatar Mar 21 '24 07:03 robdekort

Nice – thanks!

dave-smyth avatar Mar 21 '24 07:03 dave-smyth