Bridging the API chasm

By Andy Taylor

Partner A, meet Partner B: bridging the API chasm. 

Great eCommerce can’t happen in a vacuum; providing the best possible service to our brands means working with many third party SaaS providers, and sometimes it means helping those 3rd parties work well with each other.

Giant leaps

At vvast we think in terms of making major leaps with no boundaries which we call ‘relentless R&D’. We embrace compliance to drive ecommerce growth – because it’s the right thing to do and vital to comply with our ISO certification . Many of the rules and regulations around GDPR and compliance regulations are well founded to protect us now, and in the future. That’s why our partnership with Shopify is paramount to vvast’s success.

Enter OneTrust, our compliance management partner, who power our cookie banner technology and help our users make informed choices about how their data is used.

We discovered that OneTrust was having trouble detecting a specific category of Shopify cookies before they appeared in the browser, meaning our only option was to block these cookies from dropping altogether, limiting Shopify’s analytics and by extension, our ability to provide users who opt in with customised experiences. 

After working with both parties to investigate the issue, we wrote a callback script that passes users’ preferences back to Shopify’s privacy API after they’ve interacted with the OneTrust banner, instructing Shopify to drop analytics cookies if the necessary consent has been provided. 

Brilliant simplicity

In the spirit of openness and, if you’re code inclined, here’s the script itself:

Callback to Shopify privacy API on OneTrust banner interaction, passing boolean based on OT tracking consent codes

The gap between two third parties had been bridged.

I love this kind of JavaScript: a specific solution for a specific problem. It’s the translator who speaks exactly the two required languages. 

OneTrust have since added this code to their documentation to help their clients on Shopify maintain EU compliant sites. Do get in touch if you would like to find out more about our approach to ecommerce – more leaps than boundaries.