Targeting

Learn how to show different widgets on same page types

IK

Written By Irek Khasianov

Last updated 2 months ago

Widget targeting works only with App Theme blocks and Shopify 2.0 themes

Widgets are normally added to the store by Widget ID, but in some cases, you’d like to show different widgets on the same page types. For example:

  • Different product reviews on the Product page

  • Display widget only on specific Product page

  • Different widgets on the Collection page

Create a widget with targeting

On the widget page, find a section “Targeting” with different target options:

  • Disabled

  • Product - show on product pages

  • Collection - show on collection pages

  • URL - show on specific URL

Product

If you’d like to show the widget on the Product page, select “Product” in the targeting list and choose the product.

Collection

If you want to show the widget on the Collection page, select “Collection” in the targeting list and choose a product.

URL

Paste the URL where widgets should be visible. For example, https://store.com/products/dress. URL matching is strict.

Don’t forget to Save changes!

Prioritization

When we are searching for a widget to show, we look in this priority:

  1. Widget ID

  2. Product or Collection

  3. URL

Adding App block to the theme

Assuming you have added a widget for the product page, we can add an App Block to the product page.

Open Theme Editor inside Shopify.

On top bar select template for “Product”.

On the left sidebar, click on “Add Section,” and on the tab “Apps,” find “Storista Widget” and add a new block.

On block settings, there is an option to add “Widget ID.” Because with targeting, we don’t know which widget to show, the “Widget ID” field should be empty.

Click on “Save” to save changes.

That’s it. Now open the URL https://yourdomain.com/products/dress to see the result. Open the different products and confirm that the widget is not visible.

Limitations

Here are a few limitations on using the targeting feature:

  1. Products are visible only in preview mode. Small cards in the carousel are not visible.

  2. Multiple widgets with targeting on the same page are not supported. However, you can add a second widget without targeting.

  3. Multiple widgets with the same targeting are not supported. If you can’t find a widget with the same targeting, contact support.

Adding multiple widgets on the same page

If you need to add multiple widgets on same page, where is one simple rule: Only one widget should be with targeting, other widgets should use “Widget ID” field.