这是indexloc提供的服务,不要输入任何密码
Skip to content

AMP Analytics multi-selector on amp-form-submit #28348

@stephengardner

Description

@stephengardner

The documentation provided (https://amp.dev/documentation/components/amp-form/?format=websites) does a good job of describing how to track form submissions for POST request forms using form-submit and form-submit-success along with amp-analytics

Unfortunately, while testing, we've found this doesn't work on GET requests. GET request forms are used frequently to do things like perform Search submissions on Shopify by redirecting to "/search?q=...".

If a user presses Enter, submitting the GET request form, it seems like nothing can be tracked. We can track every input change event from the form input, or track specific clicks on the actual submit button (which is rarely clicked), but neither of these solves the issue. We could also perform a POST and a redirect, but this causes the overhead of an actual endpoint needing to be used, and is far less than ideal.

What is the recommended way to track GET request form submissions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions