MTU Sampling
What types of sampling does Sprig offer?
Sprig offers two main ways of sampling the number of MTUs you send to Sprig, “Customer owned” and “Sprig owned”.
You should go with the customer owned option if you have requirements for sampling that could change based on demographics or other niche segments. This is most often the best option for enterprise-sized companies.
You should go with the Sprig owned option if your requirements are basic, so you need you to stay below your threshold and nothing else. This is most often the best option for mid-market sized companies.
Customer Owned Sampling
Customer owned sampling is a system or set of rules developed by the customer to gate a predetermined number of users into Sprig. Since it’s owned by the customer, they can easily increase or decrease at will.
#Check if user already has been gated into loading the Sprig SDK
user_flag = check_sprig_flag(user_id)
# if user state is not set, randomly determine if user is gated in
if user_flag is NULL: user_flag = flag_user() end
# if user state is true, load the Sprig SDK
if user_flag is True: load_sprig() end
# example function definitions below # ============
function check_sprig_flag(user_id):
#logic that should look up a user's flag in database/storage by user ID.
# if flag exists, return it
# if flag does not exist return NULL
return flag
function flag_user(): # logic to determine if user should be feature flagged into Sprig goes here
# store this flag in reference to user ID in database/storage, so that
# check_sprig_flag() function can reference it on next application load
return flag
function load_sprig():
# load SDK based on whichever environment you're using
Sampling using A/B Tools
Similar sampling approaches can be used through your company-owned A/B testing product by feature-flagging Sprig for a specific group of users.
With feature-flagging, only a certain set of users can see or use a specific product feature--in this case, Sprig. We recommend working with your internal analytics or data science team to understand the user groups and how you wish to feature-flag them into Sprig.
Sprig Owned Sampling
Sprig owned sampling is a configuration set by Sprig per platform (iOS, Web, Android) that determines who should & should not load into Sprig. It is a random sample of the audience and cannot be customized further. In order to set up Sprig owned sampling, you can submit a request to the Sprig team by visiting Settings > Usage.
Updated about 1 month ago