buyerAcceptsEmailMarketing Missing in checkout_completed Event for Custom Web Pixel (Permissions Enabled)

We’re implementing a custom web pixel for a client on Shopify Plus. The client is correctly sharing the checkout_completed event with us, and the email marketing opt-in checkbox is visible to customers during checkout.

However, the buyerAcceptsEmailMarketing field is not present in the event payload.

The pixel has been configured with:

  • “Marketing” and “Analytics” permissions enabled in Customer Events
  • The pixel is Connected, not in test mode
  • Using analytics.subscribe('checkout_completed', callback) to listen for events

Despite this, buyerAcceptsEmailMarketing never appears in the event payload, even when the user checks the box.

We’ve seen other Shopify Plus stores where this flag is available via the same checkout_completed event under a custom pixel.

Is there a specific requirement or limitation preventing the flag from appearing?
Do we need to add special configuration to gain access to consent-based data in the pixel context?

Would appreciate guidance or confirmation on how to surface this flag in real-time via the Web Pixel API.

Hi @zamartz Thanks for pointing me to right thread, is this checkout_start_email_opt property automatically set in session Storage or the shopify client needs to do it?

@zamartz Problem is that we do not have access to checkout.buyerAcceptsEmailMarketing property

so interesting news - looks like they added to checkout_complete - not sure when

but you can compare what you see on checkout_start and save to a session variable and then compare to the post checkbox on checkout_complete!

NOTE: this is fake test site data

checkout_start

{
  "checkout": {
    "buyerAcceptsEmailMarketing": false,
    "buyerAcceptsSmsMarketing": false,
    "attributes": [
      {
        "key": "__ga4_session",
        "value": "true",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_account_id",
        "value": "abc",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_cookie_value",
        "value": "GS1.1.1744663207.10.1.1744665536.0.0.0",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_timestamp",
        "value": "2025-05-21T16:49:13.552Z",
        "__typename": "NoteAttribute"
      }
    ],
    "billingAddress": {
      "address1": "4564 Trout Lily Cir",
      "address2": null,
      "city": "Montour Falls",
      "country": "US",
      "countryCode": "US",
      "firstName": "tete",
      "lastName": "tete",
      "phone": null,
      "province": "NY",
      "provinceCode": "NY",
      "zip": "14865"
    },
    "token": "e4b16d6ac49b168bf66c85fa65e26597",
    "currencyCode": "USD",
    "discountApplications": [],
    "discountsAmount": {
      "amount": 0,
      "currencyCode": "USD"
    },
    "email": "dkdk@aol.com",
    "phone": null,
    "lineItems": [
      {
        "discountAllocations": [],
        "id": "41024653033542",
        "quantity": 1,
        "title": "Test T-Shirt Title - variations",
        "variant": {
          "id": "41024653033542",
          "image": {
            "src": "https://cdn.shopify.com/s/files/1/0279/3943/8662/files/S4IZ1-T5852M-001-ALT_64x64.jpg?v=1706120991"
          },
          "price": {
            "amount": 900,
            "currencyCode": "USD"
          },
          "product": {
            "id": "7279271247942",
            "title": "Test T-Shirt Title - variations",
            "vendor": "ZAMARTZ Test",
            "type": "womens/tops/t-shirt/crew-necks/mainline:{\"test\":1234566777\",\"test\":1234566777\",\"test\":1234566777\",\"test\":1234566777\",\"test\":1234566777\",\"test\":1234566777\"}",
            "untranslatedTitle": "Test T-Shirt Title - variations",
            "url": "/products/test-t-shirt-title-variations"
          },
          "sku": "S4BQL-W6094S-blk",
          "title": "Black / Small",
          "untranslatedTitle": "Black / Small"
        },
        "finalLinePrice": {
          "amount": 900,
          "currencyCode": "USD"
        },
        "sellingPlanAllocation": null,
        "properties": []
      },
      {
        "discountAllocations": [],
        "id": "40997758074950",
        "quantity": 1,
        "title": "Test T-Shirt Title",
        "variant": {
          "id": "40997758074950",
          "image": {
            "src": "https://cdn.shopify.com/s/files/1/0279/3943/8662/files/S4BQL-W6094M-270_64x64.jpg?v=1705669568"
          },
          "price": {
            "amount": 90,
            "currencyCode": "USD"
          },
          "product": {
            "id": "7273026945094",
            "title": "Test T-Shirt Title",
            "vendor": "ZAMARTZ Test",
            "type": "womens/tops/t-shirt/v-neck/holiday",
            "untranslatedTitle": "Test T-Shirt Title",
            "url": "/products/teet"
          },
          "sku": "TEST-SKU-NUM",
          "title": null,
          "untranslatedTitle": ""
        },
        "finalLinePrice": {
          "amount": 90,
          "currencyCode": "USD"
        },
        "sellingPlanAllocation": null,
        "properties": []
      }
    ],
    "localization": {
      "country": {
        "isoCode": "US"
      },
      "language": {
        "isoCode": "en-US"
      },
      "market": {
        "id": "gid://shopify/Market/428376134",
        "handle": "us"
      }
    },
    "order": {
      "id": "5772377096262",
      "customer": {
        "id": "7601314889798",
        "isFirstOrder": true
      }
    },
    "delivery": {
      "selectedDeliveryOptions": [
        {
          "cost": {
            "amount": 0,
            "currencyCode": "USD"
          },
          "costAfterDiscounts": {
            "amount": 0,
            "currencyCode": "USD"
          },
          "description": null,
          "handle": "e4b16d6ac49b168bf66c85fa65e26597-59c72537ce91ec77cd26c4d74afd9fca",
          "title": "Standard",
          "type": "shipping"
        }
      ]
    },
    "shippingAddress": {
      "address1": "4564 Trout Lily Cir",
      "address2": null,
      "city": "Montour Falls",
      "country": "US",
      "countryCode": "US",
      "firstName": "tete",
      "lastName": "tete",
      "phone": null,
      "province": "NY",
      "provinceCode": "NY",
      "zip": "14865"
    },
    "subtotalPrice": {
      "amount": 990,
      "currencyCode": "USD"
    },
    "shippingLine": {
      "price": {
        "amount": 0,
        "currencyCode": "USD"
      }
    },
    "smsMarketingPhone": null,
    "totalTax": {
      "amount": 75.6,
      "currencyCode": "USD"
    },
    "totalPrice": {
      "amount": 1065.6,
      "currencyCode": "USD"
    },
    "transactions": [
      {
        "amount": {
          "amount": 1065.6,
          "currencyCode": "USD"
        },
        "gateway": "bogus",
        "paymentMethod": {
          "type": "creditCard",
          "name": "BOGUS"
        }
      }
    ]
  }
}

checkout_complete

{
  "checkout": {
    "buyerAcceptsEmailMarketing": true,
    "buyerAcceptsSmsMarketing": false,
    "attributes": [
      {
        "key": "__ga4_session",
        "value": "true",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_account_id",
        "value": "abc",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_cookie_value",
        "value": "GS1.1.1744663207.10.1.1744665536.0.0.0",
        "__typename": "NoteAttribute"
      },
      {
        "key": "__ga4_timestamp",
        "value": "2025-05-21T16:51:58.244Z",
        "__typename": "NoteAttribute"
      }
    ],
    "billingAddress": {
      "address1": "4647 Kerrick Hollow Road",
      "address2": null,
      "city": "Corning",
      "country": "US",
      "countryCode": "US",
      "firstName": "etet",
      "lastName": "etet",
      "phone": null,
      "province": "NY",
      "provinceCode": "NY",
      "zip": "14830"
    },
    "token": "e3e0f4c3514b8ca633307c7978283f01",
    "currencyCode": "USD",
    "discountApplications": [],
    "discountsAmount": {
      "amount": 0,
      "currencyCode": "USD"
    },
    "email": "tete@aol.com",
    "phone": null,
    "lineItems": [
      {
        "discountAllocations": [],
        "id": "40997758074950",
        "quantity": 1,
        "title": "Test T-Shirt Title",
        "variant": {
          "id": "40997758074950",
          "image": {
            "src": "https://cdn.shopify.com/s/files/1/0279/3943/8662/files/S4BQL-W6094M-270_64x64.jpg?v=1705669568"
          },
          "price": {
            "amount": 90,
            "currencyCode": "USD"
          },
          "product": {
            "id": "7273026945094",
            "title": "Test T-Shirt Title",
            "vendor": "ZAMARTZ Test",
            "type": "womens/tops/t-shirt/v-neck/holiday",
            "untranslatedTitle": "Test T-Shirt Title",
            "url": "/products/teet"
          },
          "sku": "TEST-SKU-NUM",
          "title": null,
          "untranslatedTitle": ""
        },
        "finalLinePrice": {
          "amount": 90,
          "currencyCode": "USD"
        },
        "sellingPlanAllocation": null,
        "properties": []
      }
    ],
    "localization": {
      "country": {
        "isoCode": "US"
      },
      "language": {
        "isoCode": "en-US"
      },
      "market": {
        "id": "gid://shopify/Market/428376134",
        "handle": "us"
      }
    },
    "order": {
      "id": "5772378767430",
      "customer": {
        "id": "7601316954182",
        "isFirstOrder": true
      }
    },
    "delivery": {
      "selectedDeliveryOptions": [
        {
          "cost": {
            "amount": 0,
            "currencyCode": "USD"
          },
          "costAfterDiscounts": {
            "amount": 0,
            "currencyCode": "USD"
          },
          "description": null,
          "handle": "e3e0f4c3514b8ca633307c7978283f01-59c72537ce91ec77cd26c4d74afd9fca",
          "title": "Standard",
          "type": "shipping"
        }
      ]
    },
    "shippingAddress": {
      "address1": "4647 Kerrick Hollow Road",
      "address2": null,
      "city": "Corning",
      "country": "US",
      "countryCode": "US",
      "firstName": "etet",
      "lastName": "etet",
      "phone": null,
      "province": "NY",
      "provinceCode": "NY",
      "zip": "14830"
    },
    "subtotalPrice": {
      "amount": 90,
      "currencyCode": "USD"
    },
    "shippingLine": {
      "price": {
        "amount": 0,
        "currencyCode": "USD"
      }
    },
    "smsMarketingPhone": null,
    "totalTax": {
      "amount": 3.6,
      "currencyCode": "USD"
    },
    "totalPrice": {
      "amount": 93.6,
      "currencyCode": "USD"
    },
    "transactions": [
      {
        "amount": {
          "amount": 93.6,
          "currencyCode": "USD"
        },
        "gateway": "bogus",
        "paymentMethod": {
          "type": "creditCard",
          "name": "BOGUS"
        }
      }
    ]
  }
}