Skip to main content

Hello everyone, 

 

I’m using Shopify for the e-commerce store and using Klaviyo to handle our emailing and sales.

I’d like to displaying a country tag that come from Shopify product tag which in Klaviyo event variable we can call all the product tags by using this tag {{ event.extra.line_items.0.product.tags }}

 

In my case, the result of {{ event.extra.line_items.0.product.tags }} is

country:Japan, cuisine:Japanese, decant:RTD, decanttype:NIL, farming:Sustainability, food:Fish, food:Shellfish, format:720ml, glass:White Wine, intent:Drinker, region:Others, serve:6, style:Old, type:Sake, vintage:NV

 

Is that possible to select only country value of product tags from event variable?

 

Thank you in advance

Hi there @nyoman360and5

 

Welcome to the Community!

 

Do you mind posting a few screenshots to help clarify how your event data is showing in your preview? If you could share one of the initial tag in the email and another showing all of the information that is pulled from the tag in the preview, this will help us understand and see the correct django tag for the solution.

 

Whenever handling variables and templates, it’s always worth considering the order the event data comes through from your eccommerce site into Klaviyo. Klaviyo only reflects the data your store pushes through, we don’t create it. Hypothetically, if your event data is coming in the way you describe, it should be possible to separate the tag and only show the country. 

 

Looking forward to solving this together!

-Talyor 


I have this same question. The tag element of this 

{{ event.extra.line_items.0.product.tags|default:'' }}

has a list of multiple tags are the original poster above had noted. 

Australia, CEUS:2.4 IACET CEUs, Dates: Apr. 1 - 10 2025, Duration: 12 weeks, Format: On-Site, Language: English, Location: Virtual, Region: All, show_upsell, Type: COSP F

Within that I need to parse out specific tags such as  "Location: XXX". 

Do you know how to parse for value matches inside a variable?  For instance, I don't need "CEUS: 2.4 IACET CEUs" tag #1 but I do need "Dates:" and "Location:" and "Duration:" tags in the email.


Reply