Code
Magento\GoogleOptimizer\Model\ResourceModel\Code
What it does
This resource model manages database operations for Google Optimizer experiment codes in Magento 2.
Developers use this class to load Google experiment scripts associated with specific entities (like products or categories) for a given store, enabling A/B testing and optimization tracking.
The loadByEntityType method retrieves the most specific experiment script available, prioritizing store-specific codes over default ones.
Public Methods
- loadByEntityType()