Can we get Customer Privacy API metafields within web pixels please? 🄺

The Customer Privacy API allows us to set custom data via its own metafield api.
This can be particular helpful e.g. to save information about which particular services are currently allowed to run.

Sadly, they aren’t exposed to Web Pixels atm.

Would be pretty neat to have those available tho.

Please? :pleading_face::backhand_index_pointing_right::backhand_index_pointing_left:

Hey @Kevin_Sieger - thanks for reaching out! I can’t guarantee anything, but this does seem like an interesting idea for sure.

Would the use case be to allow Web Pixels themselves to have metafields (for example, that the metafields themselves would ā€œliveā€ under a Web Pixel object itself? Would you also want to expose those metafields in the Storefront API or just make them accessible/editable via the Admin API/in a Web Pixel metafield API as well?

Just wanted to clarify my understanding here so I can log a feature request for you. Hope to hear from you soon!

Hey @Alan_G,

Would the use case be to allow Web Pixels themselves to have metafields (for example, that the metafields themselves would ā€œliveā€ under a Web Pixel object itself?

use case would mainly be to read (and/or mutate) the already existent customer privacy metafields. As customer privacy metafields are consent-session specific, those have nothing to do with WebPixel settings or potential Web Pixel specific metafields under the Web Pixel object.

Would you also want to expose those metafields in the Storefront API or just make them accessible/editable via the Admin API/in a Web Pixel metafield API as well?

Customer privacy metafields are already readable/editable on custom storefronts via Customer Privacy API for Custom Storefronts.

Best regards,

Kevin :hatching_chick:

Ah, thanks for clarifying @Kevin_Sieger - I thought you were looking at specific Web Pixel metafields! You’re right that at the moment, Web Pixels themselves also can’t access the Customer Privacy metafields, but I’ll look into this a. bit on our end here to see if this is in the roadmap and loop back with you once I have next steps or just to confirm I’ve logged a feature request on our end here.

Hey @Kevin_Sieger following up here with some info. At the moment, this isn’t something that’s on our roadmap, and we recommend storing the consent info either in local storage, session storage or in cookies. You can also set up custom events that can fire if that’s helpful to track/use that consent data:

That said, I’ll definitely log a feature request for you too, let me know if I can add any more detail to the request I’ll log and I can get that sent up when I hear back from you :slight_smile:

yeah thats like the current workaround everyone ist using - feels a little weird though, as there ARE those metafields.

Hey again @Kevin_Sieger, I hear you on that. It’d definitely not the most ideal to have implement workarounds when those metafields are available in the Customer Privacy API, like you said. That’s a fair point for sure.

Just so I can make the feature request as comprehensive as possible, what would your ideal implementation look like? Would you mainly need to query these metafields directly from within the Web Pixel API, or would it be more helpful to have them automatically included in certain events? Also just wondering if there are specific scenarios where the current workarounds are causing issues or just adding unnecessary complexity?

Most of the time, the more detail I can include in a feature request, the better I can advocate on my end, so just wanted to follow up with you on this. Let me know what you think would work best from your perspective :slight_smile: