I've been following this tutorial in order to access store data from the analytics API: https://shopify.dev/tutorials/get-store-metrics-with-analytics-api
(1) The "Analytics Api" is bundled with "Embedded App SDK". "Embedded App SDK" is deprecated. I am asked to use "Shopify App Bridge" instead - Is there a way to use "Analytics Api" with "Shopify App Bridge" or should I implement "Embedded App SDK" nevertheless?
(2) Following the documentation on "Embedded App SDK" I added the according code to the <head> of my file:
Hi @susa1234 👋, apologies for the delayed response. Were you able to get it working eventually?
I tried the code snippet in a toy app, but didn't reproduce the error. Where are you seeing the message? Do you see the error inside the admin, or when you view the page outside of Shopify admin? Do you see the same error if you move the script tags outside of head, and into right before end of body?
For context, the analytics API is indeed not supported by App Bridge, so unfortunately, Embedded App SDK (EASDK) is the way to go.