Skip to main content
Contributor II
Jun 29, 2022 11:38 AM UTC
Solved

Shopify Customer Metafields

Shopify is going all-in on their Metafields implementation. Will Klaviyo add metafields data to their platform?

 

For example: Customer Metafields would be super handy. We could collect all sorts of data and sync it over to Klaviyo.

 

Shopify’s own segmentation tool does handle these use-cases: https://changelog.shopify.com/posts/segment-by-customer-metafields 

 

Anyone know if that’s already possible somehow?

    alex.hong
    alex.hongAnswer
    Klaviyo Alum
    Jun 29, 2022 8:26 PM UTC

    Hi @DriesP,

    Thanks for bringing this up and I think I can speak on some info regarding Shopify and Klaviyo metafields.

    Unfortunately you are limited to only the fields which are sent by Shopify, this is not something Klaviyo can change.
     
    If you want to see the full information that can be pulled through you can view the metric in the analytics page and then click on the details under a customers' timestamp:
     
    ?name=inline-2031072478.png
     
    All of the information here can be used in your emails, it might be worth checking with Shopify if they can include extra fields or alternatively you can create a custom field using our APIs which would require work from a developer on your side.
     

    Hope this helped,

    Alex

    13 replies

    Contributor I
    Feb 26, 2026 7:12 AM UTC

    hi,

    could you assist to save that form as Im trying to add my email to receive the alert but there is no option to do it?

     

    thanks

    Problem Solver I
    Nov 19, 2024 11:06 AM UTC

    Was this ever answered? I am trying to do the same thing.

    ​@Anna Orishchenko & ​@kadenandkai 

     

    This is very simple:

     

    How to Add the Klaviyo Identify Snippet to Your Shopify Store

    1. Create the Snippet:

      • In your Shopify admin, navigate to your theme's code editor (Online Store > Themes > Actions > Edit Code).
      • Under the "Snippets" folder, create a new snippet and name it klaviyo-identify.liquid.
    2. Add the JavaScript Code:

      • Open the newly created klaviyo-identify.liquid file.
      • Paste the JavaScript code snippet provided into this file.
    3. Include the Snippet in Your Theme:

      • Locate the theme.liquid file under the "Layout" folder in your theme.

      • Add the following line just before the closing </body> tag:

        {%- render 'klaviyo-identify' %}

      • Save the changes.

    That's it! You've successfully integrated the Klaviyo Identify snippet into your Shopify theme.

    Sep 9, 2024 6:35 PM UTC

    Was this ever answered? I am trying to do the same thing.

    Problem Solver I
    May 8, 2024 2:04 PM UTC

    Hi, everyone. I posted the article about syncing metafield to klaviyo.
    If you have some problem about it yet, please check it if you like.

     

    https://dev.to/tomoyanakano/sync-shopify-customers-metafield-to-klaviyos-profile-3117

    Hi, @tomotomy !

    Where should I add that script to push metafields to Klaviyo?

    This is the script example from your article. Should I add it to the theme.liquid?:

     

    <script>
    var _learnq = _learnq || [];

    {% if customer %}
    _learnq.push([
    'identify',
    {
    $email: '{{ customer.email }}',
    // add Metafield here
    $birthday: '{{ customer.metafields.namespace.birthday.value }}'
    },
    ]);
    {% endif %}
    </script>
    Contributor I
    Apr 28, 2023 6:48 PM UTC

    Hi, everyone. I posted the article about syncing metafield to klaviyo.
    If you have some problem about it yet, please check it if you like.

     

    https://dev.to/tomoyanakano/sync-shopify-customers-metafield-to-klaviyos-profile-3117

    So your article is as close to anything I’ve found on the web about pushing Metafields to Klaviyo, but my case is slightly different, maybe you have advice on if it’s possible. 

    I need to pass up the products metafields and specifically only one metafield with namespace.key: “product.shipping_timeframe” and this wouldn’t be on customer I don’t think? Since it is a products metafield, would it have to change to product? I’m not sure. This would need to show this metafield inside the placed order event. The way I have the code now, I did get the shipping_timeframe metafield to send up with Viewed Product and Added to Cart, in Klaviyo, but Placed Order is a shopify event I think (has shopify icon in klaviyo vs viewed product and added to cart has Custom Icon).

     

    This is what I have, would you make any changes? Again this is trying to push metafields about a product, to klaviyo, so that I can see the metafield value inside of the Placed Order event from Shopify.
     

    <script>
    var _learnq = _learnq || [];

    _learnq.push([
    'identify',
    {
    $email: '{{ customer.email }}',
    $birthday: '{{ customer.metafields.namespace.birthday.value }}',
    'Shipping Timeframe:' '{{ product.metafields.product.shipping_timeframe }}'
    },
    ]);
    </script>

     

    Contributor I
    Jan 8, 2023 10:08 AM UTC

    Hi, everyone. I posted the article about syncing metafield to klaviyo.
    If you have some problem about it yet, please check it if you like.

     

    https://dev.to/tomoyanakano/sync-shopify-customers-metafield-to-klaviyos-profile-3117

    alex.hong
    Klaviyo Alum
    Jan 3, 2023 9:25 PM UTC

    Hi @SeanMcC ,

    Does it not appear when you go to a specific customer’s tab and click into their Activity area?

    Problem Solver III
    Jan 3, 2023 8:12 AM UTC

    @alex.hong Would you mind explaining how to view the fields for a customer in the analytics page as per your screenshot?

     

    Thanks

    Sean

    Problem Solver I
    Jan 3, 2023 3:33 AM UTC

    This would be so helpful! Really would like to use metafields as source of truth on customer data. It would be extremely helpful to see these automatically from the default shopify integration. 
     

    If you could also connect these to Klaviyo forms so you could update/populate metafields from Klaviyo, that would be great. There are other apps that sync data into metafields, which means the metafield needs to be a source of truth. If using custom Klaviyo properties, how do other apps see that info without custom API dev. 
     

    I can’t stress enough how helpful this would be and I think with privacy regulations and first party data, being able to store and operate off of metafields will be critical for many businesses. 
     

    Please add me to feature request and any updates on this feature. Happy to interview on expectations or whatever would be helpful. 
     

    Thank you! 

    alex.hong
    Klaviyo Alum
    Nov 15, 2022 2:28 AM UTC

    Hi @Brian Horner ,

    Thanks for the feedback and I have submitted a product update request based on your comment. Additionally, you can post into our Developer group on the Community so that we get more attention to this. The more Klaviyo sees a certain feature or idea, the larger push it has to bring that to live.

     

    Have a good day,

    Alex