Skip to content

Commit

Permalink
Merge pull request #1 from newfold-labs/fix/ga-event
Browse files Browse the repository at this point in the history
Fix GA event payload
  • Loading branch information
wpalani authored Oct 17, 2023
2 parents 66d9e4d + b5a02ae commit 5fa1db9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions includes/DeactivationSurvey.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function deactivation_survey_runtime() {
'pluginSlug' => $plugin_slug,
'strings' => array(
'surveyTitle' => __( 'Plugin Deactivation Survey', 'wp-module-deactivation' ),
'dialogTitle' => __( 'Thank You for Using the ' . ucwords( container()->plugin()->id ) . ' Plugin!', 'wp-module-deactivation' ),
'dialogDesc' => sprintf( __( 'Thank you for using the %s plugin!', 'wp-module-deactivation' ), ucwords( container()->plugin()->id ) ),
'dialogTitle' => sprintf( __( 'Thank you for using the %s plugin!', 'wp-module-deactivation' ), ucwords( container()->plugin()->id ) ),
'dialogDesc' => __( 'Please take a moment to let us know why you\'re deactivating this plugin.', 'wp-module-deactivation' ),
'formAriaLabel' => __( 'Plugin Deactivation Form', 'wp-module-deactivation' ),
'label' => __( 'Why are you deactivating this plugin?', 'wp-module-deactivation' ),
'placeholder' => __( 'Please share the reason here...', 'wp-module-deactivation' ),
Expand Down
9 changes: 5 additions & 4 deletions static/js/deactivation-survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@
body: JSON.stringify({
action: 'deactivation_survey_freeform',
data: {
label_key: surveyInput.length > 0 ? surveyInput : 'No input',
category: 'user_action',
brand: runtimeData.brand,
page: window.location.href
'label_key': 'survey_input',
'survey_input': surveyInput.length > 0 ? surveyInput : 'No input',
'category': 'user_action',
'brand': runtimeData.brand,
'page': window.location.href
}
})
});
Expand Down

0 comments on commit 5fa1db9

Please sign in to comment.