SEO & AEO guide: Templates and tokens

Set the pattern used when you apply a template to many items at once. Each item fills in its own details.

Set the pattern used when you apply a template to many items at once. Each item fills in its own details.

The four templates

Meta tags → Edit templates holds four patterns per content type, shipped with sensible defaults:

Template Default
Meta title template {{ product.title | truncate: 45 }} | {{ shop.name }}
Meta description template Shop {{ product.title }} at {{ shop.name }}. {{ product.description | first_sentence | truncate: 110 }}
Image alt text template {{ product.title }} {{ image.variant }} – image {{ image.position }}
Image filename template {{ product.title | slug }}-{{ image.position }}

The filename field notes: “Lowercase words joined by hyphens work best. The file extension is kept.”

Tokens

An Insert into meta title row lets you click a token in rather than typing it:

Group Tokens
Product Product title, Vendor / brand, Product type, Description (plain text), Tags, First variant SKU, First collection
Price Lowest price, Compare-at price
Variants Variant count, Colour options, Size options, Variant name
Store Store name, Store domain
Images Image position

Tokens that make a title specific — Colour options, Size options, Product type — are also the ones that stop a bulk run producing duplicates.

Filters

“Add a filter after a bar to shape a value, for example {{ product.title | truncate: 40 }}.”

Filter What it does
truncate: N Cuts the value to N characters.
upcase / downcase / capitalize Changes case.
default: 'text' Supplies a fallback when the value is empty — the most useful filter in the list.
slug Lowercases and hyphenates. Used for filenames.
first_sentence Takes the first sentence of a longer value, typically the description.

default deserves a habit: any token that can be blank on some products — vendor, product type, compare-at price — will otherwise leave a gap or a stray separator in the finished tag.

The preview

The right-hand panel renders your template “Using <a real product> from your store”, as a Google result mock-up, with character counts for Title and Description and the resulting Alt text and Filename.

Those character counts are the point. Check them against a product with a long name as well as a short one — a template that fits your hero product can overflow badly elsewhere.

Where templates are used

“Apply template and Fix all missing with template on the Meta tags screen, and alt text and filename tools on the Images screen. Nothing changes on your store until you run one of them.”

Editing and saving a template changes nothing by itself. It takes effect the next time you run one of those four tools.

Per content type

Templates are per content type — Products, Collections, Pages, Blog posts — each on its own tab, each with its own token set. A collection template cannot use variant tokens; a blog template works from the article.

Save templates commits your changes; Restore defaults puts back the shipped patterns.

Writing a template that holds up

  1. Start from the defaults. They are already sensible and already fit the character counts.
  2. Add one distinguishing token if your catalogue has near-identical product names — colour, size or type.
  3. Put default on anything optional.
  4. Check the preview against your longest product name, not your favourite one.
  5. Run it, then check the Duplicates filter on the Meta tags screen. That is the real test of whether the template is specific enough.

Still stuck? Email [email protected] — we reply within 24 hours, every day of the year.

Need help with SEO & AEO? Our team can set it up for you. Contact NIVI Solutions or see the app.

Questions about Templates and tokens

Who builds and supports SEO & AEO?

NIVI Solutions builds and supports the app. Contact our team through the app or our contact page for help.

Can NIVI Solutions set this up for us?

Yes. We can configure the app, import your data and connect it to your ERP as part of a Shopify project.

Is NIVI Solutions a Shopify Partner?

Yes. NIVI Solutions is a Shopify Partner with 15+ years of B2B commerce experience.