---
title: Attribute Marketing Consent to Retail Locations - Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/track-the-retail-locations-where-your-customers-update-their-marketing-consent
  md: >-
    https://shopify.dev/changelog/track-the-retail-locations-where-your-customers-update-their-marketing-consent.md
metadata:
  effectiveApiVersion: 2025-04
  affectedApi:
    - displayName: Admin GraphQL API
      handle: admin-graphql
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: false
  createdAt: '2025-01-27T10:45:08-05:00'
  postedAt: '2025-02-05T09:00:00-05:00'
  updatedAt: '2025-02-04T09:47:42-05:00'
  effectiveAt: '2025-02-07T12:00:00-05:00'
---

February 5, 2025

Tags:

* Admin GraphQL API
* 2025-04

# 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).
