Embedding custom HTML along with customer id

Topic summary

A user is trying to embed a Typeform widget into a Shopify page and needs to dynamically pass the customer ID to the form. The challenge involves integrating Shopify’s Liquid templating language with Typeform’s embed code.

Proposed Solution:

  • Use Liquid code to conditionally check if a customer is logged in
  • Dynamically insert the customer ID into the Typeform’s data-tf-hidden attribute
  • Wrap the embed script with Liquid conditional tags ({% if customer %} / {% else %} / {% endif %})

Open Question:
The original poster asks whether Liquid needs to be explicitly enabled in the Shopify page HTML editor, or if they can simply copy-paste the modified code directly. This remains unanswered, leaving the implementation method unclear.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

Hi, I have typeform script to embed inside one of my shopify pages.

I’m trying to figure out how to pass the customer id to the form

To pass the customer ID to your Typeform embedded form in Shopify, you can make use of Liquid code to dynamically insert the customer ID into the script. Here’s an example of how you can modify your code:

{% if customer %}
  

{% else %}
  

{% endif %}

Do I need to enable liquid on Page html somehow or just copy paste into the page html editor?