Skip to main content

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?

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


Hi @alex.hong 

 

Thanks for that answer. All though my whole point is that Shopify has much data, that’s open to grab with their API’s, but Klaviyo doesn’t use it yet.


Basically it would be great if Klaviyo would sync more available Shopify customer data to profiles:

- Customer Locale:
https://shopify.dev/api/admin-graphql/2022-04/objects/Customer => customer.locale 

- Customer Metafields:
https://shopify.dev/api/admin-rest/2022-04/resources/customer => customer.metafields (Can fetch all metafields or let users choose) 

*Shopify Customer Metafields are where Shopify merchants can store additional information about customers. (VAT info, Loyalty tier, Birthday date etc…)

If Klaviyo One want to be the unified customer platform these seem pretty straightforward tbh :-)

Thanks for looking into this or forwarding this to the dev team!


Hi @alex.hong 

As mentioned, this seems like a no-brainer feature seeing all of this customer metadata is vital for personalized customer communication. Where can we submit this request to the dev team for possible inclusion as a Klaviyo feature? It would be simple for us to setup custom properties in Klaviyo that sync with the profile in Shopify via the api. I know you guys are wanting Shopify to release an app that allows us to specify what metafields are sync’d, but having all of this rich data on my customers without being to use it for marketing purposes is a shame. 


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


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 Would you mind explaining how to view the fields for a customer in the analytics page as per your screenshot?

 

Thanks

Sean


Hi @SeanMcC ,

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


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, 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 || a];

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

 


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(s
'identify',
{
$email: '{{ customer.email }}',
// add Metafield here
$birthday: '{{ customer.metafields.namespace.birthday.value }}'
},
]);
{% endif %}
</script>

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


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.


Reply