Personyze allows you to create dynamic product recommendations in JSON format, ideal for integrating personalized content within your custom web or app environment. Follow these detailed instructions to successfully set up your JSON-based product recommendations.
Step 1: Select the Recommendation Algorithm
Begin by choosing the context of your recommendation:
- Home Page: General personalized recommendations based on visitor behavior.
- Category Page: Recommendations based on a specific category context.
- Product Page: Recommendations related to the currently viewed product.
- Cart Page: Recommendations based on items in the visitor’s cart.
- Thank You Page: Recommendations after completing a purchase.
- Search Page: Recommendations relevant to visitor search queries.
- Not Found Page: Recommendations for visitors who land on unavailable products.
Algorithm Types:
- Personalized Recommendations: Products most likely to interest the visitor based on similar visitor behaviors.
- Others Who Viewed Also Viewed: Products viewed by visitors who looked at the same items.
- What Others Bought, Who Viewed This: Items frequently purchased by visitors viewing the current product.
- Most Popular: Top viewed products overall or within a time frame.
- Best Seller: Top purchased products overall or within a category.
- Recently Viewed: Products recently viewed by the current visitor.
- Items in Your Cart: Displays current items in the visitor’s cart.
- Buy it Again: Products previously purchased by the visitor.
- Cross-Sells: Complementary products based on items in the cart.
- Managed Cross-Sells: Manually curated cross-sell recommendations.
- Inspired by Last Viewed Category: Products related to the last category visited.
Step 2: Define Your JSON Result Format
Next, you’ll define which product attributes you want included in your JSON output:
- Field on Personyze: Select fields like ID, Times Purchased, Main Image URL, Sale Price, etc.
- Name in JSON Result: Enter your custom key names for each attribute to match your JSON structure needs.
JavaScript Integration
You must define a JavaScript variable to capture the JSON output:
var test_personyze = /* JSON data from Personyze */;
To track clicks on your recommended items and integrate with Personyze’s analytics, use the provided JavaScript snippet, ensuring you replace PRODUCT_ID
and ACTION_ID
appropriately:
(self.personyze=self.personyze||[]).push(['Product Viewed', PRODUCT_ID, 'action_id', ACTION_ID]);
Note: The ACTION_ID
is provided after saving your campaign.
Additionally, to trigger custom actions once the JSON data is ready, use:
(self.personyze=self.personyze||[]).push(['When action executed', ACTION_ID, result_ready]);
function result_ready() {
console.log('The JSON is ready', test_personyze);
}
Advanced Settings: “Don’t Show If…”
You may set conditions to hide recommendations in specific scenarios. Common conditions include:
- If recommended items are already purchased or in the cart.
- Visitor already viewed the recommended item.
- Product availability (e.g., stock status).
Finalizing Your Recommendation Widget
After configuring the algorithm, JSON fields, and any advanced conditional settings, click “Done Editing” to finalize your setup. Make sure to save your campaign to activate the recommendations.
Your JSON-based recommendations are now ready to be integrated into your application or website, delivering dynamically personalized content to enhance visitor engagement and conversions.