How can I fix the code for the "logo_test" snippet in a white-label email service using customer.io?
I'm trying to create a snippet that sends the URL of an image stored in my assets, based on an attribute such as customer.company_name
. However, the code I have tried doesn't seem to work. Here is the liquid code I have tried:
{% assign env = "91305" %}
{% assign file_name = "Acme-logo.png" %}
{% capture company_url %}
https://userimg-assets.customeriomail.com/images/client-env-{{ env }}/{{ file_name }}
{% endcapture %}
{% if customer.company_name == 'Acme Inc.' %}
{{ company_url }}
{% else %}
https://default-img-url.com{{ env }}/default-logo
{% endif %}
I'm expecting the link generated by this code to appear as the src of the html tag. Could someone please help me figure out what's wrong with this code and how to fix it?
The img URL are tested.