-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Google Analytics Event trigger #3125
Conversation
@SvenAlHamad @Pavel910 @adrians5j
|
@neatbyte-vnobis Regarding question #1 - Let's not insert GA into the page automatically. Let's just add a note under that trigger saying: "Make sure you have Google Analytics installed on your website before using this trigger.". |
I'll comment on this tomorrow morning (I've already spent my daily PR-reviews time box 😉). |
Question #2 - sounds good 👍🏻 Question #3 - also sounds good 👍🏻 Thank you @neatbyte-vnobis ! |
@SvenAlHamad 1.2. |
@neatbyte-vnobis Let's use Option #1, but I would place the message under the button. |
@SvenAlHamad PR was updated according to a comment |
@SvenAlHamad @adrians5j |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just need to double-check frontend trigger processing.
@@ -52,6 +52,17 @@ const DefaultFormLayout: FormLayoutComponent = ({ | |||
const result = await submit(data); | |||
setLoading(false); | |||
if (result.error === null) { | |||
const googleAnalyticsEvent = formData.triggers?.["google-analytics-event"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trigger processing should not be in the layout. Triggers are handled internally, here:
packages/app-form-builder/src/components/Form/FormRender.tsx:173
Changes
Implements issue "Add a trigger for Google Analytics / Google Ad events".
WIP
How Has This Been Tested?
Manual
Documentation
None