consent-tracking-api never loads - callback never invoked

consent-tracking-api never loads - callback never invoked

Andrew20
Shopify Partner
7 0 4

Hi. We have a Shopify app that installs a script which uses the consent-tracking-api, as below. This works for all of our customers except 1...

 

When I debug the script on their site, I can see we execute the call to `window.Shopify.loadFeatures` but the callback is never invoked (I would expect it to be called at least with an error)

window.Shopify.loadFeatures(
  [{ name: 'consent-tracking-api', version: '0.1' }],
  function(error) {
    // THIS CALLBACK IS NEVER CALLED!

    if (error) {
      throw error;
    }
    shopifyConsentTrackingApiReady();
  }
);

 

What could be the reason that the API does not load or initialize correctly? Has anyone else seen this?

Replies 3 (3)

kiranjose
Shopify Partner
3 0 1

We are facing same issue and couldn't find a solution for this. 

Are there any new updates or findings about the issue?

Andrew20
Shopify Partner
7 0 4

In our case we contacted Shopify support and they said the store had been misconfigured. Apparently they were following some headless instructions even though it wasn't a headless store. My advice would be to just start from a clean theme if possible and confirm it all works there first

kiranjose
Shopify Partner
3 0 1

Thank you for the suggestion. That would be a good starting point.

The tricky part is that, these websites have several other 3rd party scripts and other Shopify apps and we have to make this work along with them.