# Attribute Marketing Consent to Retail Locations — Shopify developer changelog --- ## Attribute Marketing Consent to Retail Locations You can now attribute customer marketing consent to a specific source location. This enhancement allows you to track marketing opt-in rates by retail location and provides better visibility into how customer marketing opt-ins are captured. The `CustomerEmailMarketingConsentState` and `CustomerSmsMarketingConsentState` GraphQL APIs can now return the retail location where the marketing consent state was last updated, when applicable. New fields: * `CustomerEmailMarketingConsentState.sourceLocation` * `CustomerSmsMarketingConsentState.sourceLocation` For more information on using the GraphQL Admin API to query customer data, please refer to the [API documentation](https://shopify.dev/docs/api/admin-graphql/2025-04/objects/Customer). *Published: February 07, 2025* Tags: API, New Link: https://shopify.dev/changelog/track-the-retail-locations-where-your-customers-update-their-marketing-consent ---