Content revision 4e771eaf0390cc87b6c7c6fd8469f3508f6ceeec7119472e6c1ccf17e2e1e5d2 ## Reading the stores' product data Dealtracker Source ID dealtracker:what-happens-behind-the-email Original https://www.henryw.me/#/dealtracker#what-happens-behind-the-email WildEarth and Find Your Feet express similar products and filters differently. Applying my preferences consistently meant first accounting for each store’s URL format, page loading, and product labels. I kept the store-specific handling at the point of collection, then normalised the listings so the same filtering and email logic could work across both retailers. The stages below follow a listing into the digest. Store filters Saved brand, size, gender, and discount preferences are encoded in the URL format each store expects. Page loading A headless browser runs the page’s scripts so it can read product grids loaded after the initial response. Product data Arc'teryx and Arcteryx count as the same brand. When a store's gender labels are inconsistent, the product title is used to infer the category. New matches Each qualifying product is checked against the saved history before it can enter the digest. Delivery An HTML email is sent when at least one new product passes all filters.