A/B testing ratio of sums  Context
Consider the following scenario for a company selling goods online. A user can purchase several items (i.e. basket of items), some of which are of particular importance and are tracked specifically (let's call them star items).
We wish to test a change in an algorithm (e.g. recommendation, risk assessment, add targeting, whatever...) which may influence both the number of star items sold, and the total sales.

*

*This a standard A/B test setup - the randomization unit is at the user level.

*The purpose of the A/B test is to compare the impact of the algorithm change: the control group has the original algorithm and the variant has the new algorithm

*One key metric of interest is defined as the ratio of star items sales over total sales. This is a sum of across all transactions of all users in the scope of each A or B group.

*This means that the analysis unit is at the transaction level, which is different than the randomization unit

*Metrics are calculated over the entire duration of the test (e.g. 2 weeks)

Detail of the metric used
Given group A and a set of users $U_A = \{u_1,u_2,...,u_{N_A} \}$, each user is involved in a number $t_{u_n}$ of transactions. The set $T_A$ of all transactions of all users in group A for the duration of the test is $T_A = \{ t_{u_{11}}, t_{u_{12}}, ... t_{u_{nm} }  \}$.
The metric of interest for group A is defined over all transactions in scope of group A. The sums are at the transaction level, not the user level.
$$\text{Metric}_A = \frac{\sum_{t_{i} \in T_A} \text{sales star items }$}{\sum_{t_{i} \in T_A} \text{sales }$ }$$
Of course, we could modify the definition to calculate the user level mean and that would simplify everything, but that is not the metric that is being used.
Questions
What statistical test could be used for such a metric ? An additional consideration is that although we can safely assume that users are i.i.d., it is most likely wrong to assume that individual purchase baskets are i.i.d. for the same user.
Here are a few ideas I came across, have any A/B testing practitioners come across similar metrics in the past ?

*

*z-test of proportions

*Bootstrapping and Jacknife

*Delta method

*Change the metric (last resort)

https://en.wikipedia.org/wiki/Ratio_estimator
Edit - Some clarifications
The reason behind this question is that I have often seen the z-test of proportion being used in this situation. Popular tools used for A/B testing often default on the proportion test and business users rarely check the underlying assumptions required for the test to be valid. @dnqxt's answer below is a good example: "Just use the z test of proportion !" - but I would like to see a rigorous statistical justification as to why (or why not) this test can be used in such a case.
I personally don't think that using a z-test of proportions would work here as sales from a purchase event are not Bernoulli trials. I argue that we cannot say that each dollar sold in the denominator can be viewed as a Bernoulli trial resulting in 0 or 1 star item dollar sold in the numerator. Moreover, since the randomization unit is at the user level, purchase events of the same user are not independent (but I would say that is a secondary issue). I could be wrong here, so please feel free to prove this otherwise !
We could also change the metric to make it a Bernoulli/Binomial which converges to Normal by using counts, but that would be a last resort solution
$$ \frac{\# \text{sales with star items} }{\# \text{sales}} $$
 A: What is described is a classical case of an A/B experiment where we have dependence between users and items (purchases here); we need to account for this because otherwise we will have a biased estimate of the associated variance. To counter that, we either bootstrap by taking account user/item clusters or we go fully parametric using a mixed model. The paper by Bakshy & Eckles (2013) Uncertainty in Online Experiments with Dependent Data: An Evaluation of Bootstrap Methods is an invaluable reference on that matter that focuses on online A/B tests.
Looking into the things in more detail, in some ways the B&E paper is a extended use-case of the Owen's (2007) paper The pigeonhole bootstrap. Similarly the mixed effect approach is based on the uber-classic paper by Bayeen et al. (2009) Mixed-effects modeling with crossed random effects for subjects and items. 
To briefly comment in the methods you mention: as you correctly identify the $z$-test on proportion is oversimplifying; it will assume IID and as the B&E paper presents, that assumption can be seriously misleading. The same limitation extends to bootstrap, if we ignore the structure of the data. Regarding the Delta method: deviations from normality and/or noisy data usually make the Delta method suboptimal in comparison to bootstrap approaches (e.g. Hole 2007 A comparison of approaches to estimating confidence intervals for willingness to pay measures) but I have seen some recent papers (e.g. Deng et al. 2017 Trustworthy analysis of online A/B tests: Pitfalls, challenges and solutions and Deng et al. 2018 Applying the Delta Method in Metric Analytics: A Practical Guide with Novel Ideas) that seem promising; notice that there is the implicit assumption that the average treatment effect will be normal. Finally, the change of metric is also an excellent idea when reasonable. We should not be afraid to push for changes that are more mathematically coherent just because a metric is already in place.
In conclusion: If there is an over-arching scheme on all the papers I cited above is that   we need to ensure that our unit of analysis and our unit of randomisation are aligned with our research questions. 
A: A very simple approach would be to use a permutation test. This is is distribution-free test so you don't have to worry about distributions.
The idea is simple. You randomly shuffle the labels and count how many times the measured difference of your metric of interest is larger than the difference you got from your real data. The ratio you get is your p-value.
Why does it work ? Well, if the null hypothesis is True, then randomly shuffling the labels (i.e being in group A or B) would very often yield better values then the one you measured. However, if your recommendation algorithm works, then randomly shuffling would rarely yield better result than the one you got.
You may also use bootstrapping to get confidence intervals on your metric of both your A and B group. This, two, is allowed without assumptions on your distribution. That's not equivalent of a statistical test (even if the CI intervals do not cross), but the visual aspect of "bars + error" bars can be interesting for your team.
I have answered a very similar question (where you indeed found me). How to test the difference in two proportions when the outcomes aren't binary? . I think the code I suggested there apply here too.
p1 <- sum(sales_data[target_control==1,"final_value"])/sum(sales_data[target_control==1,"initial_value"])
p2 <- sum(sales_data[target_control==0,"final_value"])/sum(sales_data[target_control==0,"initial_value"])
yourGap<-abs(p1-p2)
L<-sales_data["target_control"]==1
LfilterOnlyBuyers<-sales_data["sale_success"]==1

count=0
for ( i in 1:10000) {
  Lperm=sample(L)
  p1_perm <- sum(sales_data[Lperm,"final_value"])/sum(sales_data[Lperm & LfilterOnlyBuyers,"initial_value"])
  p2_perm <- sum(sales_data[!Lperm,"final_value"])/sum(sales_data[!Lperm & LfilterOnlyBuyers,"initial_value"])
  if (abs(p1_perm-p2_perm)>=yourGap) {
    count=count+1
  }
}
pvalue=count/10000

A: Bootstrap confidence intervals would be my choice of technique for this scenario. I would like to outline an approach with some example choice numbers that you can use and the reasoning behind the approach:


*

*You have two pots/bags and each bag contains people from the control
    group and variant group: $U_{ctr}$ and $U_{var}$ with respective
    sizes $N_{ctr}$ and $N_{var}$. I changed your notation slightly, I
    hope that's OK.

*You select a random sample of $k$ people from both groups with replacement. If both of your populations are "sufficiently large" (say at least 2000 users for example) you can choose $k\leq N_{ctr}$ and $k \leq N_{var}$. Rule of thumb: I usually select $k = \frac{min(N_{ctr},N_{var})}{5}$ for more flexible results but in most bagging (bootstrap aggregating) algorithms, the default option is to sample from the whole population. If your populations are smaller then you can still do that but make sure you select a "sufficiently large" $k$ (say at least 400 users), again by sampling with replacement. Let's say note them $SU_{ctr}$ and $SU_{var}$ both of size $k$

*You calculate your metric by getting all transactions that each person in each group made by looking at the original $T$ transactions dataset for each user in $SU_{ctr}$ and $SU_{var}$. You will then end up with $Metric_{ctr1}$ and $Metric_{ctr2}$. Store these values. Important notice: you should calculate these values by summing the total star items sales and dividing by the total sales. Don't take the average of each person's individual sales basket. This is very important as this is the metric you are looking at.

*Go back to point 2 and iterate. The optimal number of bootstrap samples, $B$, that you can choose depends on many factors but again, a good rule of thumb would be around 1000 times.

*You now have a $B$ amount of $Metric_{ctr}$ and same for $Metric_{var}$. You can now choose to compare their means using many of the usual techniques. I would personally choose to construct confidence intervals and see if they overlap or an independent sample t-test AND complete the analysis with some histograms/density plots & boxplots. 


Off-topic personal opinion: Always choose to viz things such as distributions whenever possible, we have the power to do that nowadays. The tests above are totally fine but there are cases where they might go wrong. For instance if you choose $B$ to be extremely high, say 1000000, then even the smallest difference between the means is more likely to be flagged as significant.
The above is robust because no matter what underlying distribution is, the central limit theorem ensures that if $B$ is sufficiently large, both means of $Metric_{var}$ and $Metric_{ctr}$ across the samples will be normally distributed and the tests will be valid. You will witness that from the visuals as well. Any concerns about underlying distributions of different user spends etc will be dealt by the CLT. 
There are plenty of references and good reads by the users before me. Furthermore, there is a lot of research conducted on the optimal example numbers I mentioned above you can look into it to. I just wanted to give you a more empirical and easy to understand outline of approach that is robust. You can start with that and see whether things change by changing the above example numbers.
A: regression with cluster robust standard errors will be a solution.
assume raw data df like this:
randomization_id,  analysis_id, treat, y
               1,            1,     1, 0
               1,            2,     1, 1
               1,            3,     1, 0
               2,            1,     0, 1
               2,            2,     0, 0

library(sandwich)
library(lmtest)
mod <- lm(y ~ treat, df)
coeftest(mod, vcov = vcovCL, cluster = ~randomization_id)

this will give exactly the same value as Delta method.
The advantage of this approach is that it can easily handle more complex situations, for example, control for the imbalance of covariates to improve statistical power.
reference:
Deng, A., Lu, J., & Qin, W. (2021). The equivalence of the Delta method and the cluster-robust variance estimator for the analysis of clustered randomized experiments. arXiv preprint arXiv:2105.14705.
