Add plugin version, Google Merchant Center account ID, and Google Ads account ID to frontend pageview tracking events #2200
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.
Changes proposed in this Pull Request:
Project thread: pcTzPl-20H-p2
This PR implements another JS part of the project. The target is to attach the following properties when Woo core sends pageview tracking events related to this plugin's pages:
To achieve the above target, this PR:
prepareEventProperties
in tracks.js toprepareEventProperties
and export it.woocommerce_tracks_client_event_properties
filter.globals.wcAdminFeatures.navigation
tofalse
for jest as the new WooCommerce navigation experience is currently on hold and disabled forcibly.addFilter
to match its uniquely identified convention.@wordpress/hooks
doc:Screenshots:
Detailed test instructions:
localStorage.setItem( 'debug', 'wc-admin:*' )
.t.gif
.wcadmin_page_view
tracking events have the base properties.google-listings-and-ads/js/src/utils/tracks.js
Lines 35 to 37 in 61ef165
wcadmin_page_view
tracking events sent from other pages don't have the base properties.Changelog entry