gtag js code causing lcp issues

Hi,

A few months back, i created google tag which i didnt make much use of it. Later, i shifted from dawn to craft. The gtag code is not present in the theme. liquid. I have disconnected GA4 from shopify, despite this there is third party blocking time issue with gtag. I am not sure , where else can the code can be present other than theme liquid. please help me where to find the gtag hidden code from the shopify files and delete the code.

Thanks

@meenak149 can you share store url?

Hii @meenak149 , I have examined your website using Google Page Insights, and below is the result for your core web vitals.

As you can see, your TBT is fine, but your other Core Web Vitals, like LCP, FCP, and speed index are concerning.

Images Load Delay

As per the analysis, your home banner image is causing LCP to go high.

Suggested Improvement

Image Compression

You already used WebP format and preloading for the home banner image. I would recommend compressing the image by using an online tool available in the market. This will make the image load faster.

Lazy Loading Other Elements

While your LCP image should load immediately, you can implement lazy loading for images that appear further down the page, but remember to apply this only for the images you do not need immediately at the start. This reduces the initial page load time by loading non-critical images only when the user scrolls near them.

Example -

Product Image

Render Blocking Resources

Your Javascript and CSS are blocking the FCP of your website.

Suggested Improvement

First, for CSS that is essential for rendering the page (above-the-fold content), you can inline it directly in the section of your HTML. This reduces the time the browser spends fetching external stylesheets.

Example -

body { margin: 0; font-family: Arial, sans-serif; }

Additionally, try to defer Non-Critical JavaScript; this will help to allow the page to display the content first and load the scripts later.

Example -

If JavaScript is still causing the issues, i would recommend removing the js line of code from third-party resources.