Conversation
Contributor
Author
|
Related to #219 |
Contributor
|
@oscarssanchez @felipeelia @iamdharmesh @Sidsector9 @dinhtungdu looking for a quick review from one of you on this one to get merged in to support Max's work on the debug bar integration. |
|
Kudos, SonarCloud Quality Gate passed!
|
This was referenced May 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.








Description of the Change
This PR introducing new hooks to remote requests:
Hooks for Site Automation
sophi_request_argsfilter: Filters the arguments used in Sophi HTTP request.sophi_request_resultfilter: Filters a Sophi HTTP request immediately after the response is received.Used in:
SophiWP\SiteAutomation\Request::request()andSophiWP\SiteAutomation\Auth::request_access_token()Hooks for event tracker
sophi_tracking_datafilter: Filters the data used in Sophi track event request.sophi_tracking_resultaction: Fires after tracker sends the request.Since the entire
$dataarray is sent to Snowplow, looks it not safe to add new attributes to the array (f.e. for debugging). That's why we add theSnowplow\Tracker\Tracker $trackerobject as a reference in both filters.Used in:
SophiWP\ContentSync\send_track_event()sophi_tracker_emitter_debugfilter: Allows to enable debug mode in the emitter to save responses and analyse them later.Used in:
SophiWP\ContentSync\init_tracker()Closes #255
Possible Drawbacks
Checklist:
Changelog Entry
Credits
Props @cadic