feat: add prompt_title to the modal checkout data events #2271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
This PR, along with Automattic/newspack-plugin#4377 and Automattic/newspack-popups#1508, add the
prompt_titleto the GA4 data captured by the modal checkout when it's triggered from a campaign prompt, based on feedback.See NPPM-2486.
How to test the changes in this Pull Request:
console.log( 'Event Info:', eventName, filteredPayload );before this line, go through some different checkout interactions with the prompts and make sure you confirm all the different events include theprompt_title:With the Donate Block:
openedandloadedevents include theprompt_titleand it matches your promptcontinueevent includes theprompt_titleand it matches your promptbackevent includes theprompt_titleand it matches your promptform_submissionandform_submission_successmessages include theprompt_title.dismissedevent includes theprompt_title.With the Checkout Button block
openedandloadedevents include theprompt_titleand it matches your promptcontinueevent includes theprompt_titleand it matches your promptbackevent includes theprompt_titleand it matches your promptform_submissionandform_submission_successmessages include theprompt_title.dismissedevent includes theprompt_title.With the Checkout Button block with Variations
opened_variationsincludes theprompt_titleopenedandloadedevents includes theprompt_titleform_submissionandform_submission_successmessages include theprompt_title.With a standard Checkout/Donate Block
Other information: