TechnicalWebAnalytics / dataLayer-shopify

A dataLayer integration specific to extracting information from Shopify.
MIT License
143 stars 94 forks source link

Replace include tag with render #43

Open lspilker opened 2 years ago

lspilker commented 2 years ago

Hi, thank you for providing the datalayer implementation and excellent instructions on how to install it. I noticed that inserting the liquid snippet in theme.liquid you used {% include 'dataLayer-allPages' %}. I had to change the include tag to render in order to make it work since Shopify depreciated the include tag.

Thank you!

mohamedhassank20 commented 2 years ago

could you please explain how you did it

Sky-bits commented 2 years ago

{%- render 'dataLayer-allPages' -%}

YOU CAN DO THIS WAY @lspilker @mohamedhassank20

Brendonwbrown commented 1 year ago

Render is new to Shopify liquid spec, but include should still be supported to my knowledge.

The previous commenter's code is includes an extra single quote. Please use this: {% render 'dataLayer-allPages' %}