Skip to content
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

Reduce the number of events being sent to GA4 #119

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

crodriguezbrito
Copy link
Contributor

Proposed changes

This PR aims to reduce the number of events sent to G4A.

JIra: https://jira.newfold.com/browse/PRESS0-2195

Type of Change

I have addressed the following:

  • Stop sending site_health_debug events (payload is too large and I don't think these are coming through anyway)
  • wp_mail only if email matches editor user, admin user, or site admin email
  • Stop sending real-time comment metrics but replace it with a weekly cron comment count

For comment metrics, we have already a weekly cron so I added the data using the newfold_wp_data_module_cron_data_filter filter.

 [meta] => Array
        (
            [post_comments_count] => 3
            [products_count] => 2
            [orders_count] => 0
            [product_reviews_count] => 3
        )

The comments are divided into two:

  • Post comments – post_comments_count
  • Product reviews – product_reviews_count

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Video

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant