Adding a product collection to your tracking page can be a great way to drive repeat purchases. By utilizing the Rebuy widget, you can add a dynamic product collection to your page, which will refresh the products shown for each customer based on what they’ve previously purchased. 

How to Create a Widget in Rebuy

Here's a quick look at the steps: 

  1. Within the Rebuy admin section, navigate to Online Store, and select Custom Widgets

  2. Be sure to select “Custom Widget” and not “Custom Popup”, then name your new widget accordingly. 

  3. Ensure that your widget settings are set to the following: 

    • Live Mode ON 

    • Data source rule has something set to ensure data is being returned. We recommend using the rule “If anything, return AI recommendations”. 

  4. From here, you can tweak the design and layout to your liking. 

  5. After the widget is created to your liking, navigate to the Install Instructions section, and grab the widget code from the Placement section. This will be the <div data-rebuy-id> section of the code. 

  6. Use the script above from #2 and plug in your own Shopify brand slug. 

  7. Place your new widget on your tracking page! 

Here's a deeper dive into each step:

From the Rebuy admin, navigate to the Online Store tab. From here you can see the most popular locations you can upgrade your online store as well as a list of all created widgets. Select "Custom Widgets".


If you haven't already created some custom widgets, you'll see a menu with some prebuilt configurations, select "Custom Widget" not "Custom Popup". Otherwise, select "New Widget" on the top right-hand side of your screen to see the list of pre-configured options.


Give it a Good Name!


The Data Source (Recommendations)

The "Data Source" is how Rebuy powers the widget and shows the customer relevant recommendations. You can use AI, Top Sellers, as well as curate and hand pick your own recommendations based on what the customer has purchased. After you create your custom widget, it will default to a blank rule. You can either change this to some of the preconfigured data sources ( AI, Top Sellers, Buy It Again) or edit the created data source and make your own recommendation. Malomo recommends using the rule “If anything, return AI recommendations”. Please make sure the data source rule has something set to ensure data is being returned. For more on Data Sources, check out our list of articles here.

Styling and Language, and Presentation

Determine what you want the language of the widget to say, how many recommendations you want to show the customer (we generally show 4 at a time in a carousel with more options), possible discounting, etc. To learn more about creating product page rules for your new widget, check out this Rebuy article. If you want a deep dive into widget settings, check out this Rebuy article.

Adding your Malomo Tracking Page Widget

After you've completed all the necessary steps to create your widget, you'll need to copy and paste the div, or widget id, and ask your Malomo CSM to add it to your tracking page for you! You can either grab this from the "Placement" section of your widget settings, or from "Install Instructions" at the top.


There are two pieces to the widget code that you’ll need to include: 


<div data-rebuy-id="###"></div>

The ### in this case will be your Rebuy account numerical widget ID. 

2. <script async src=""></script>  

The XXX will be your Shopify brand slug. 


<div data-rebuy-id="34496"></div>

<script async src=“”></script>

Woohoo! You're Done

You should now have powerful recommendations on your newly upgrade Malomo tracking page.

Updating Your Widget

 You will be able to make updates to the widget to change out any products or data sources, as well as any style updates necessary. These changes will automatically be updated on the Malomo tracking page once the changes are made

Direct Customers to Your Tracking Page with Personalized Rebuy Recommendations

Once you have created the widget and it is embedded on your tracking page. You will want to update the URL structure behind the Track my Package buttons, or anywhere that links to the tracking page from the customer emails to the following url structure:  

For Malomo Hosted Tracking pages:{{ }}&_m_tracking_code={{ event.tracking_code }}

For Tracking Page hosted on your website (Shopify Theme App or Malomo.js setup):{{ }}&_m_tracking_code={{ event.tracking_code }}