Conditionally displayed elements on my website that show based on customer tag not updating?

I have a theme that shows a different logo when a specific customer segment is logged in with specific tags. It shows fine and everything works, then I published a new version of my theme. Everything is still in there with the liquid tags for displayed a different image when the customer has a specific tag, but it stops displaying in my browser for those customers unless they manually clear their cache or open the site and log in via a private/incognito browser window. I don’t want this happening everytime I push a new theme edit live.

Why is this happening and how can it be avoided?

During sale periods, I duplicate my existing theme with all the correct code and update a few images here and there so I can sechdule that duplicate to go live for the sale but when it’s pushed live - even though all the same coding is in tact for this functionality - it stops working. For context, I’m using the Sleek theme.

This is the custom code snippet to show a different logo based on customer tag:

{% if customer and customer.tags contains 'CUSTOM-catalog' %}
          
        {% else %}
        
        {%- endif -%}

Hi,

Hope this will work

  • Add a Cache-Busting Trick to Logo URL

Code example (Update your src=“custom-catalog-logo.png”)

{% if customer and customer.tags contains 'CUSTOM-catalog' %}
  
{% else %}
  
{% endif %}

Or Use Shopify’s Built-In Image Filters for Dynamic URLs

Or Disable Cache for Authenticated Customers (Advanced)