Use Shopify Liquid Variables as Custom Properties

Lisa Fockens Updated by Lisa Fockens

🔥 We now support built-in properties for Shopify. The properties listed in this document are available out of the box.

If you are interested into sending other properties to Shopify, continue reading!

Setup

First of all, enable the wisepops() function on your shop by following this article.

Then, in wisepops.liquid, copy the following code at the end of the file, before the closing </script>  tag:

// Properties about the variant
wisepops('properties', {
variant: {
available: {{ variant.available | json }},
sku: {{ variant.sku | json }}
}
});

In this example, we are sending info about the product variant currently being viewed: its availability and its SKU.

Trigger a popup when the variant is out of stock

Step 1: Open your popup in the Wisepops builder.

Step 2: Click Display and select Ecommerce or Custom properties.

Step 3: Click the Add rule button.

Step 4: Input variant.available in the condition field, and select "Is false" from the dropdown menu.

Use other Liquid variables

You're free to use other Liquid variables in your targeting. To do so, update the script provided at the beginning of this tutorial. Each Liquid variable must be declared as follows:

NameOfTheVariableInWisePops: {{ LiquidVariableName | json }},

Visit the Shopify website to get the full list of Liquid variables. And feel free to contact us if you need help with the setup.

You can learn more about custom properties in this article.

How did we do?

Use Google Tag Manager Variables as Custom Properties

How To Retarget Visitors Who Saw a Specific Page on Your Website

Contact