{% assign stamped_key_public = shop.metafields['stamped'].api_public %} {% if customer %} {% assign stamped_key_secret = shop.metafields['stamped'].api_secret %} {% assign stamped_customer_accepts_marketing = customer.accepts_marketing %} {% assign stamped_customer_email = customer.email %} {% assign stamped_customer_first_name = customer.first_name %} {% assign stamped_customer_id = customer.id %} {% assign stamped_customer_last_name = customer.last_name %} {% assign stamped_customer_orders_count = customer.orders_count %} {% assign stamped_customer_tags = customer.tags | join: ',' %} {% assign stamped_customer_total_spent = customer.total_spent %} {% assign auth_token = customer.id | append: customer.email | hmac_sha256: stamped_key_secret %} {% endif %}