Skip to content

Commit

Permalink
refactor: restructure segmentation criteria sections
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo committed Oct 13, 2023
1 parent d2a144c commit adaddaf
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions src/criteria/default/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,29 @@
/**
* Reader Activity.
*/
'newsletter' => [
'name' => __( 'Newsletter', 'newspack-popups' ),
'user_account' => [
'name' => __( 'User Account', 'newspack-popups' ),
'category' => 'reader_activity',
'options' => [
[
'label' => __( 'All users', 'newspack-popups' ),
'value' => '',
],
[
'label' => __( 'Has user account', 'newspack-popups' ),
'value' => 'with-account',
],
[
'label' => __( 'Does not have user account', 'newspack-popups' ),
'value' => 'without-account',
],
],
],
'newsletter' => [
'name' => __( 'Newsletter', 'newspack-popups' ),
'description' => __( 'Subscriber status based on any newsletter list.', 'newspack-popups' ),
'category' => 'newsletter',
'options' => [
[
'label' => __( 'Subscribers and non-subscribers', 'newspack-popups' ),
'value' => '',
Expand All @@ -54,22 +73,22 @@
],
'subscribed_lists' => [
'name' => __( 'Subscribed to newsletter lists', 'newspack-popups' ),
'description' => __( 'Whether the reader subscribed to any of the selected newsletter lists', 'newspack-popups' ),
'category' => 'reader_activity',
'description' => __( 'If the reader is subscribed to any of the selected newsletter lists.', 'newspack-popups' ),
'category' => 'newsletter',
'matching_function' => 'list__in',
'matching_attribute' => 'newsletter_subscribed_lists',
],
'not_subscribed_lists' => [
'name' => __( 'Not subscribed to newsletter lists', 'newspack-popups' ),
'description' => __( 'Whether the reader is not subscribed to any of the selected newsletter lists', 'newspack-popups' ),
'category' => 'reader_activity',
'description' => __( 'If the reader is NOT subscribed to any of the selected newsletter lists.', 'newspack-popups' ),
'category' => 'newsletter',
'matching_function' => 'list__not_in',
'matching_attribute' => 'newsletter_subscribed_lists',
],
'donation' => [
'name' => __( 'Donation', 'newspack-popups' ),
'description' => __( '(if checkout happens on-site)', 'newspack-popups' ),
'category' => 'reader_activity',
'description' => __( 'If the reader has completed an onsite donation.', 'newspack-popups' ),
'category' => 'reader_revenue',
'options' => [
[
'label' => __( 'Donors and non-donors', 'newspack-popups' ),
Expand All @@ -91,50 +110,32 @@
],
'active_subscriptions' => [
'name' => __( 'Has active subscription(s)', 'newspack-popups' ),
'description' => __( 'If the reader is an active subscriber to subscription products.', 'newspack-popups' ),
'category' => 'reader_activity',
'description' => __( 'If the reader is an active subscriber to non-donation products.', 'newspack-popups' ),
'category' => 'reader_revenue',
'matching_function' => 'list__in',
'matching_attribute' => 'active_subscriptions',
],
'not_active_subscriptions' => [
'name' => __( 'Does not have active subscription(s)', 'newspack-popups' ),
'description' => __( 'If the reader is NOT an active subscriber to subscription products.', 'newspack-popups' ),
'category' => 'reader_activity',
'description' => __( 'If the reader is NOT an active subscriber to non-donation products.', 'newspack-popups' ),
'category' => 'reader_revenue',
'matching_function' => 'list__not_in',
'matching_attribute' => 'active_subscriptions',
],
'active_memberships' => [
'name' => __( 'Has active membership(s)', 'newspack-popups' ),
'description' => __( 'If the reader is a member of membership plans.', 'newspack-popups' ),
'category' => 'reader_activity',
'category' => 'reader_revenue',
'matching_function' => 'list__in',
'matching_attribute' => 'active_memberships',
],
'not_active_memberships' => [
'name' => __( 'Does not have active membership(s)', 'newspack-popups' ),
'description' => __( 'If the reader is NOT a member of membership plans.', 'newspack-popups' ),
'category' => 'reader_activity',
'category' => 'reader_revenue',
'matching_function' => 'list__not_in',
'matching_attribute' => 'active_memberships',
],
'user_account' => [
'name' => __( 'User Account', 'newspack-popups' ),
'category' => 'reader_activity',
'options' => [
[
'label' => __( 'All users', 'newspack-popups' ),
'value' => '',
],
[
'label' => __( 'Has user account', 'newspack-popups' ),
'value' => 'with-account',
],
[
'label' => __( 'Does not have user account', 'newspack-popups' ),
'value' => 'without-account',
],
],
],
/**
* Referrer Sources.
*/
Expand Down

0 comments on commit adaddaf

Please sign in to comment.