facebook tracking image

How To Prefix Product Tags on Shopify

How To Prefix Product Tags on Shopify Cover Image

This time cover more advanced functionality of Tag Genie using our most powerful tool - Custom Tag Operation. How can you prefix product tags on Shopify? While that might sound like a trivial task it gets more complicated if you try to prefix different tags using the same prefix.

Imagine that you have 20 discount tags like ‘10% Off’, ‘20% Off’, etc and your goal is to add the prefix “Sale” to all of them. You can certainly create 20 operations to rename each individual tag but is there a more efficient way? There certainly is with Tag Genie and what we call Tag Templates.

Using Tag Templates you can add prefix to tags in bulk by using the special token {{tag_name}} which will basically match the name of the tag being processed.

So in order to add the prefix “Sale”, click the “Create Tag Operations” button in Tag Genie and then select Custom Tag Operation. On the next screen, add Rename tag operation and choose the condition that will match the tags you would like to add a prefix to. Having our example in mind, we can use the contains condition to match all tags that contain "%" which will match all tags like ‘10% Off’, ‘20% Off’.

The last step is to choose the new tag name. This is where we can use Tag Templates - simply type in “Sale {{tag_name}}” and Tag Genie will prefix all matching tags with “Sale” giving you “Sale 10% Off”, “Sale 20% Off, etc.

As always, we have prepared a short video tutorial to guide you through the process.

layouts/posts/single.html
Key Value
Template layouts/posts/single.html
Content Source posts/2021-09-01-prefix-product-tags-shopify/index.md
Type posts
Kind page
Section posts
Layout
maps.Params{"authors":[]string{"Milan Nankov"}, "categories":[]string{"Features"}, "date":time.Date(2021, time.September, 1, 0, 0, 0, 0, time.UTC), "draft":false, "image":"posts/prefix-product-tags-shopify/featured.png", "images":[]string{"posts/prefix-product-tags-shopify/featured.png"}, "iscjklanguage":false, "lastmod":time.Date(2021, time.September, 1, 0, 0, 0, 0, time.UTC), "publishdate":time.Date(2021, time.September, 1, 0, 0, 0, 0, time.UTC), "slug":"prefix-product-tags-shopify", "summary":"Prefixing tags is a common scenario when managing tags. Using Custom Tag Operation and tag templates, you can prepend a random text to any Shopify tag.", "tags":[]string{"Tutorials"}, "thumbnail":"posts/prefix-product-tags-shopify/featured.png", "title":"How To Prefix Product Tags on Shopify"} (type:maps.Params)
SiteInfo Variable Value
Title "Tag Genie - Bulk Edit & Automate Tags for Shopify"
Author
Social
LastChange 2022-12-05 00:00:00 +0000 UTC
DisqusShortname ""
GoogleAnalytics "G-DZMZT5Y535"
Copyright ""
RSSLink "https://taggenieapp.com/index.xml"
LanguageCode "en-us"
BuildDrafts false
Params maps.Params{"debugbar":true, "font_base":"'Lato'", "font_heading":"'Roboto'", "footer":maps.Params{"description":"Bulk edit & automate product, customer, and order tags & metafields for Shopify. Reduce overhead and improve sales by fixing missing or incorrect tags.", "facebook":false, "footer_primary_heading":"Product", "footer_secondary_heading":"Resources", "footer_tertiary_heading":"Support", "linkedin":"https://www.linkedin.com/company/tag-genie/", "show_footer_logo":true, "show_menu_footer_primary":true, "show_menu_footer_secondary":true, "show_menu_footer_tertiary":true, "show_social_media_links":true, "show_zerostatic_link":false, "twitter":"https://twitter.com/taggenie", "youtube":"https://www.youtube.com/channel/UCxRhEM0h12RRcLveP2h4Grg"}, "global":maps.Params{"header_fixed":true}, "grey_color":"#E6E9F5", "hero":maps.Params{"hero_background_gradient_one":"#2b3af7", "hero_background_gradient_two":"#2b8cf7"}, "homepage":maps.Params{"features_title":"Take control of your tags!", "show_features":true, "show_testimonials":true, "testimonials_title":"What people are saying..."}, "mainSections":[]string{"posts"}, "mainsections":[]string{"posts"}, "primary_color":"#4654A3", "secondary_color":"#E6E9F5", "secondary_light_color":"#E6E9F5", "sitename":"Tag Genie - Bulk Edit & Automate Tags for Shopify", "title_suffix":"Tag Genie for Shopify"} (type:maps.Params)
navigation.Menus{"footer_primary":navigation.Menu{(*navigation.MenuEntry)(0xc0002c3790), (*navigation.MenuEntry)(0xc0002c3a00), (*navigation.MenuEntry)(0xc0002c3ad0)}, "footer_secondary":navigation.Menu{(*navigation.MenuEntry)(0xc0002c3ba0), (*navigation.MenuEntry)(0xc0002c3c70), (*navigation.MenuEntry)(0xc0002c3ee0)}, "footer_tertiary":navigation.Menu{(*navigation.MenuEntry)(0xc000348410), (*navigation.MenuEntry)(0xc0003485b0)}, "main":navigation.Menu{(*navigation.MenuEntry)(0xc0002c3110), (*navigation.MenuEntry)(0xc0002c3520), (*navigation.MenuEntry)(0xc0002c35f0), (*navigation.MenuEntry)(0xc0002c36c0)}} (type:navigation.Menus)