Hi,
My goal is to achieve the BFS badge, but metrics like LCP and CLS are still not in the expected range defined by Shopify.
In my app, I need to display the app embed status after Shopify review. I also render different components on the homepage based on whether the app embed is enabled or disabled. Currently, I’m fetching the app embed status on the server side in all requests for the index page, which is increasing TTFB and negatively impacting LCP. And also, it needs to be checked in all requests for the index page.
At the moment, my approach is:
-
Fetch the theme ID using a GraphQL request
-
Using the theme ID, retrieve
settings_data.json -
From
settings_data.json, extract the app embed status (enabled/disabled)
I also checked and couldn’t find any webhook that provides app embed status updates.
My question is:
- Is there a more optimized way to store or retrieve the theme ID or app embed status that I can persist in my database to avoid repeated server-side fetching?
Am I missing any approach or is there any gap in my current understanding?
Looking forward to your guidance. Thanks in advance.