Hello,
I am migrating my store to Checkout Extensibility. I need a way to fire analytics events depending on the checkout/ customer data. For example, if a user opted-in to Email or SMS marketing I would like to fire a custom event with some properties. However I cannot find any information on the documentation. The checkout or order data does not contain this information. Feels like a lot of data is missing if we compare to liquid or other apis available.
Can anyone provide some info on this?
BuyerIdentity does not provide this info. The Checkout data also does not contain the information.
Hello @NicoSpoke
To get the Buyer’s consent please check below Steps
- Step 1: add the code below to your shopify.extension.toml
[extensions.capabilities.collect_buyer_consent]
sms_marketing = true
customer_privacy = true
- Step 2: add below code in the Extension React file
import { reactExtension, Button ,useApi, useEmail,} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() =>

4. Step 3: Output

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
Hello @NicoSpoke
I recommend trying the Pandectes GDPR Compliance app, which offers extensive checkout extensibility features along with an API to manage user consent effectively. This might be a perfect solution for your needs.
Best regards,
Nikos
Hello,
I have tried to do what you suggested by I get nothing in my console.log
I have deployed the app to my local development store too (not just preview mode)
Does the user need to be logged in?
Thanks