DataFeedWatch Blog | Data feed optimization tips

How to Segment Your Products by Sales Data Automatically

Written by Jagoda Adamik-Borowska | February 12, 2026 10:41:07 AM Z

In this article, you will learn how to segment your products using sales data to better manage Google campaigns. We will focus on segmenting them into best-selling and worst-selling products by assigning dynamic labels to each group. This is a step-by-step framework developed by one of our agency partners, Austin Becker, and the templates and solutions referenced throughout the article are based on this approach.

By leveraging this segmentation, you can create targeted campaigns for your top-performing products, such as the top 10 or top 25, while also addressing underperforming products with tailored strategies. For example, you might allocate higher budgets and aggressive bidding strategies to your best-sellers, while testing new creatives or offers for your worst-sellers.

The real power of this method lies in automating this segmentation process. By dynamically updating these labels based on real-time sales data, your campaigns will always reflect the latest performance trends. This ensures that your Google campaigns remain optimized, allowing you to focus your ad spend on what’s working and quickly adapt to changes in product performance. Additional resources and examples can be found on the Austin Becker Marketing website.

 


Why is it important to automate product segmentation based on sales data?

You need an automated system to segment your products based on sales data, because it makes no sense to work with outdated data. Automation means that your data is updated every day or even several times a day, so your data is always fresh.

When it comes to best-selling products, trends can change quickly. For example, inflatable water toys may be among your top 10 best-selling products in the summer, but you won't sell more than a few in the winter. On the other hand, your best-selling product in the winter may be wooden sleds for babies. So you can see that the list of your best products based on sales revenue can change regularly, even on a daily basis.

What is necessary to do if you want your data to be up to date is to automate this process completely so that based on the last 30 days, your items would be ranked according to the revenue in relation to the revenue of other items in the store.

How to automate the process of segmenting your products by sales rank in 4 steps

Austin Becker has created a product data template in which he has set up labels for products and created formulas that help automate the process of assigning specific labels to specific items.

You can use this template as a base for your own product list. Using it, you divide them into Top 10, Top 25, Top 50, and Top 100. Your list to always be updated according to the sales revenue for each item based on the last 30 days.

SEE THE TEMPLATE

Here’s how you can do it:

Step 1: Import active item IDs from DataFeedWatch daily

You need to import the list of your active item IDs to the sheet you work on. You can do it using Google's AppsScript extension and the ready-made script template at this link:

 

THE SCRIPT - COPY IT

 

What you need to do is to get your product feed live URL from your DataFeedWatch account. You will find it in your shop under the specific channel.


Then paste your feed URL into the script into xlmURL. Hit run and voila!

It will take all those active items, and it'll put them in the sheet titled “Title Lookup Key”.

Set up & coordinate AppScript and DataFeedWatch update times

You must ensure that the product data you use is always up to date, so don't forget to schedule appropriate updates.

  • Add trigger time in AppsScript. You want it to update once a day after the DataFeedWatch update. Let's say the update takes place at 2 a.m.

 

  • Set up an update in the DataFeedWatch tool before 2 a.m. We suggest you do it at 11:00 p.m. Make sure DataFeedWatch has enough time to process the update and download the data. In this example, there are 3 hours between updates, which gives you plenty of time.


So between 2 a.m. and 3 a.m. every day you'll have your sheet set up and ready to go with the latest data.

Step 2: Import item revenue data from GA4 or eCommerce platform daily

You need to import sales revenue data every day. We'll give you an example if you import it from GA4. The easiest way is to use a data import tool such as Adveronix, SyncWith or Supermetrics.

Adveronix fetches the requested data and inserts it into the spreadsheet. In our example, it involves item ID and item revenue.


You need to schedule an import that takes place once a day at around 4 a.m.


This way you will get fresh GA4 data in a spreadsheet every day.


Step 3: Assign best seller ranks to each item

You should assign the seller's rank based on specific item revenue, and it can all be done with ready-made formulas, which you can copy.

To explain better, what the formula does is take the revenue from your raw data from GA4 which you’ve imported into a sheet and then the revenue gets ranked with another specific formula and then based on that rank you add a label which is a manually entered piece of text, for example top 10 top 25 top 50 or other names you wish. The label is then being added based on the criteria you set up.

Then we have a final output of your IDs in the column on the left and all of the bestseller ranks in the column on the right.


Step 4: Import best seller ranks into your custom_label

What we have at this point is a process that runs steps 1, 2, and 3 between midnight and 3:00 a.m. every day. Step 4 is a step that depends on steps 1, 2 & 3 taking place.

If you don't run the first three steps, then your sales data won't be updated and you'll be importing old data back into your feed for your custom label. You must therefore schedule a final update inside your DataFeedWatch account once all the previous steps have been completed - this will take place at 4 a.m. This way, you will receive the latest data.


Then, in DataFeedWatch you need to create a custom label - let’s go with custom_label_0:

 

It's simply a matter of asking the DataFeedWatch system to find everything in column A (item ID in column A in our example) and everything next to it in column B, and assign it the value you have created.

  • Choose ID - you want to look up the itemIDs in your sheet
  • Copy the URL of your sheet and paste into your custom_label_0

What you are getting is that you have created the attribute custom label zero, and the value assigned to this custom label zero for this specific item ID will be top 10 or for another top 25 and so on.


Quick summary of updates

 

  • DataFeedWatch should run around 11:00 p.m. to download all of the latest data for Step 1: Import active item IDs from DataFeedWatch daily. This means if you remove or add new items with item IDs to your sheet you get that downloaded around 11:00 p.m..
  • Step 2: Import item revenue data from GA4 or eCommerce platform daily and Step 3: Assign best seller ranks to each item should be scheduled after 11:00 p.m. and before 3. am
  • The last Step 4: Import best seller ranks into your custom_label should happen at 4 a.m, and custom labels will be updated once more. This update is required because all the new data need to come into a custom label in the DataFeedWatch tool.
  • There are also additional updates you need to remember to schedule if you use other tools: around 2 a.m. in AppScrips and around 4 a.m. in Adveronix.

Conclusion

Segmenting your products by sales data and automation changes the way you manage ad spend. Instead of guessing which products deserve the biggest budget, you can rely on a data-driven system that updates daily.

This dynamic approach ensures that your campaigns are always targeted at your current top performers, whether it's a specific “Top 10” list or a broader “Top 25” segment. You no longer have to worry about seasonal fluctuations or outdated bestseller lists dragging down your performance.

Download the template created by Austin Becker, linked in the article, to start building this system yourself.