ActiveCampaign Forum

Generating random segments


I like to test out promotions and products by generating random segments on my list. I’m having trouble finding a feasible way to do this.

Back when I was on MailChimp, I used their “Hairball” app for generating random segments. I could just choose a percentage of the list size I wanted the segment to be, and it would generate it.

With AC, I’ve tried using “email address CONTAINS” to generate a random segment, but CONTAINS requires a minimum of three characters, and you can only have three instances of CONTAINS to cobble together a segment.

There are only so many three-letter segments that are common enough in email addresses to get to my usual target segment size of 5,000, so I’m prone to having a lot of overlap when I try out different things.

Does anyone know a better way to generate random segments?

Testing Email Design

I’m still open to ideas, but for posterity’s sake, here’s what I did:

  • Exported my whole list
  • Generated random numbers in Excel (NeoOffice, really) using RANDBETWEEN, a la this article. The key here is you have to copy then “paste special” just the numbers and not the formulas to keep Excel from re-generating the random numbers. I also used a relatively small range for random number generating: only 5,000 for a list of 36,000, because it was bogging down NeoOffice.
  • I sorted the spreadsheet by the pasted numbers, and deleted all but the top 5,000 contacts.
  • I re-imported into AC with a tag added to identify the segment.

Not the most elegant solution, but it got the job done.


Hi @kadavy :slight_smile:

So, I’m going to come at this from a different direction taking into account what you’ve shared.

First off, your second post/option was what a lot of the team suggested, so kudos on your Excel work :).

Ok, so let’s dive in -

I’m going to suggest utilizing our Split Test Campaign. One has the ability to test 5 different iterations during one campaign send. With your list size, this would amount to around the same ballpark in regards to your preferred segment size. You could then tweak it down if you wanted to stay closer to 5K.

In each of the different tests you could highlight a different product or promotion. Then, on the summary page, you would select “Do not determine the winner” under the split test options. This will then send your 5 different tests to 20% of your list respectively.

Each segment would become it’s own “randomized” segment. Another feature that I think could add a lot of value to this exercise would be to utilize the Automated Link Actions Feature to expand upon the actions taken by your contacts. Thus, being able to utilize each test’s metrics, and build upon your contact records with our tagging functionality.

Let me know if this sounds like a cool alternate way of accomplishing your goal - would love to discuss more!


Hey Ted! Thanks so much for that explanation. The one thing I’m not sure of is that it appears that I would still be sending to all of my list: just several different options.

I just want to identify a small segment and work with them on a beta product before I try anything with the rest of the list. Is there a way for this method to work for that case?


Of course!

It’s true that you would be sending to your entire list, but since each of the tests (20% of your list) would receive completely different content, you could have all tags & actions associated with the different tests be your vehicle for further testing with that group/product.

However, if you only want to work with a predefined subset/segment, then this may not be the path to accomplish your testing.


Hi, thanks for the explanation.

However i want to send a test to a fixed (small) amount of my campaign.
I can “set this” when ‘Determine winner’ is active; 10% 35% and 55% to the winner.
Without determining a winner the field is disabled. why?

I want to send a standard mail to 90% of my list and a test to the remaining 10%.