Is This The Correct Way To Leave An Annotation In Shopify Template Files?

- 1 answer

Just want to confirm if this the correct way to leave an annotation in Shopify template file?

<!-- Beginning Of My Pixel Code -->

This is so I can remember which pixel is for what and keep organized.



That is an HTML comment and it is correct. So you can use it. Note that it is visible in the source code of the delivered HTML from Shopify, so everyone can read your comment.

If you want to comment in Liquid templates without having that show up in the source, you can use comment tags.

{% comment %}  Beginning of my pixel code {% endcomment %}