You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If its value is none, no snippet will be added to the post.
If its value is anything other than an empty string, the snippet will be added with the value of the post meta setting as the product ID.
Otherwise, all taxonomy terms attached to the post will be queried and each attached term will be checked for a googlesitekit_rrm_{Publication ID}:productID term meta setting (if possible, a meta query will be used to query all terms with the meta set). The value for the first found match will be checked.
If its value is none, no snippet will be added to the post.
If its value is anything other than an empty string, the snippet will be added with the value of the term meta setting as the product ID.
Otherwise, the snippetMode module setting will be checked.
If it is per_post, no snippet will be added.
If it is post_type, it will be checked if the post type of the current post belongs to the postTypes array module setting.
If not, no snippet will be added.
If yes, the snippet will be added with the value of the productID module setting as the product ID.
If it is sitewide, the snippet will be added with the value of the productID module setting as the product ID.
If the current screen is not a singular post, the following logic will be used:
The snippetMode module setting will be checked.
If it is sitewide, the snippet will be added with the value of the productID module setting as the product ID.
If none of the above conditions are met, no snippet will be added.
@aaemnnosttv While brainstorming the ACs for this issue, I realised that I did not consider an edge-case scenario. Suppose, in a certain post, the RRM tag is not added based on the above logic. However, the user has added the inline button block (#9963). Since we're not adding the snippet, the button will not work. Do you have a suggestion on how we can address this edge-case? Thank you!
Feature Description
The Reader Revenue Manager snippet placement logic should be updated to enable conditional and context-aware snippet placement, as follows:
googlesitekit_rrm_{Publication ID}:productID
post meta setting will be checked.none
, no snippet will be added to the post.googlesitekit_rrm_{Publication ID}:productID
term meta setting (if possible, a meta query will be used to query all terms with the meta set). The value for the first found match will be checked.none
, no snippet will be added to the post.snippetMode
module setting will be checked.per_post
, no snippet will be added.post_type
, it will be checked if the post type of the current post belongs to thepostTypes
array module setting.productID
module setting as the product ID.productID
module setting as the product ID.snippetMode
module setting will be checked.sitewide
, the snippet will be added with the value of theproductID
module setting as the product ID.If none of the above conditions are met, no snippet will be added.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: