What you’ll learn:
- Set up Weighting Logic to assign scores to products based on user responses.
- Use individual or property-based weighting to control recommendations.
- Test and refine your logic by previewing real-time weight calculations.
Weighting logic is based on the concept that every answer provides one or more products with a specific weight, representing its level of priority to be recommended (higher weight = higher priority).
As the quiz progresses, the “weights” across products will adjust according to the user’s answers. Each answer option will assign a product with a numerical weight, or score. When an answer is selected, the score associated with that answer is added to the associated product’s total score. At the end of the quiz, the highest scored product(s) will be recommended to the customer.
VIDEO: Watch the video below to see how weighting works
This approach is useful when you want to give different levels of importance or significance to each answer option, or you have many products/questions which require a more complex quiz setup.
Setting up your weighting logic
- On the Quiz Settings page, under the Results tab, select Logic Mode > Weights. Make sure to click Save.
- Go back to the box editor.
- Navigate to one of your quiz questions and select the button in the quiz which you want to match to a product, this will open the specific button editor on the left panel.
- We have two ways of applying weighting logic:
- Weighting by individual product: This is only recommended when you have a small feed. To do this:
- Scroll down until you find the option “Quiz Weight Logic (By Single Product)” and toggle it on.
- Click “Add/Edit” and this will open the weighting editor for this button.
- Select the product from the dropdown and add the weight you want to attribute to this product when this button is clicked.
- You can add multiple products to the same button, once done, click Save.
- Weighting by product property: This recommended for when you have a larger number of products with an organized categorization. You can add weights based on any field in your product feed, for example Product Name, Description, Tags, Collections, etc. To do this:
- Scroll down until you find the option “Quiz Weight Logic (All Products Matching Text)” and toggle it on.
- Click “Add/Edit” and this will open the weighting editor for this button.
- Click on the column dropdown, this will show you all the property options based on your feed. For Shopify quizzes, the most popular Column is “Tags”.
- Once we have selected the column you want to target, you’ll need to choose the operator. The most popular one is “contains” which will look for any value in the selected column containing the text. See section below for a breakdown of all the operators available.
- Type the text you want the column value to contain. As you type in, you’ll see a list of all the values that contain the text you are adding, you can use this for reference to confirm what you are adding does indeed exist in your feed.
- Input the weight you want to give to the product that matches the column value. This can vary depending on your use case, you may want to give higher weighting to specific categories vs others. You can also add negative weighting to demote specific products.
- You can add multiple column values and weighting to the same button, once done, click Save.
- Follow the same process for all the buttons in your quiz that should impact the results. Note not every question/answer needs to impact results, if one button is left blank, it’ll simply not add or reduce any points.
- Weighting by individual product: This is only recommended when you have a small feed. To do this:
How to test your weighting logic
As you build your quiz you can always test your logic by doing the following:
- From the box editor, click on Preview on Blank Site.
- As you click through the options in your quiz, you’ll see an option called “Show Results Calculation” in the top right corner.
- This will show a real-time calculation of which products are being recommended and why. Digioh will recommend the products that have the most weights applied to them.
In this mode, you can easily see how the weights are being added for each question and where each product is being ranked. You can use this to easily modify which products are getting recommended at the final result. If you take the entire quiz, you can see the final results and what those weights are and why.
Breakdown of text matching logic operators
When setting up the weighting logic, there are 4 available operators we can use to interact with the column we want to target, these are:
- Contains text: Adds weight to any products that contain the indicated text anywhere within the configured column.
- Matches Whole Words: Adds weight to any products that contain the indicated text as a whole within the configured column. Keep in mind it will exclude word variations, for example, if you’ve entered “tea” will not match with “teas”
- Equals Exact: Adds weight to any products if the input text matches exactly with the value for the configured column.
- Regex: Short for “regular expression,” this operator allows for advanced pattern matching. It will trigger when the content of the field fits a specified pattern. When using this operator, it is recommended to have a prior understanding of regex building, we recommend using https://regex101.com/ for testing your syntax.
Some additional notes on weighting
- Another popular option is to create a unique Shopify Tag called “Promote on Quiz” – this way you can easily promote products that are bestsellers, get low returns, and have great margins all the time by just adding a tag in Shopify.
- Not all the options are required to have weights, maybe just one question is the most important for the product recommendation, so it is the only one with weights.
- Not all the options are required to have the same weight, you can always add more or less weight.
- Products can have negative weight, this won’t remove the product completely from the results calculation, but reduce the total score associated to it. If you want to fully remove a product from ever being recommended, use a very high negative score (for example -10000).