How to estimate if goods are complementary or substitutes when one good is always offered for free? Usually  whether two goods are complementary or substitutes can be measured by estimating cross-price elasticity of demand. If cross-price elasticity of demand is negative the two goods are complements and if the cross-elasticity of demand is positive they are substitutes. However, how would we determine if goods are complements or substitutes when one is provided for free (e.g. are free e-books on Bayesian analysis and coffee complements or substitutes?).
Now, as far as I understand, theoretically this does not pose any issue because even though price of one good is always set to 0 there will be some theoretical demand for the e-book that will depend on price (even if we can't observe any price other than 0).  But from a practical perspective would it be possible to estimate cross-price elasticity empirically in such case?
Normally, we would estimate cross-price elasticity in some sort of regression like (or more sophisticated analogues):
$$\ln q_x = \beta_0 + \beta_1 \ln p_x + \beta_2 \ln p_y +...+ \epsilon$$
but $\beta_2$ can only be identified if $VAR(p_y) \neq 0$ since $\beta_2= \frac{COV(q_x,p_y)}{VAR(p_y)}$.
Are there any models that could allow us to estimate cross-elasticity even in such cases or is it simply impossible? Are there other empirical methods of determining if goods are complementary/substitutes aside from estimating cross-price elasticity?
I tried to do due diligence search on google scholar but even though there are plenty of papers discussing estimation of cross-price elasticities (such as Deaton 1987), I was not able to find paper discussing this issue. This being said estimating such elasticities is not area of my specialty so I am not sure if I am missing some important keywords. I ask this question because I TA undergraduate microeconomics class and one of the students raised this, in my opinion very interesting, question.
One answer is to try to find variation in the non-pecuniary price of the free good. Here is a famous example from estimating demand for public parks:

In 1949, Harold Hotelling wrote a letter to the National Park Service,
outlining a method where the park visitor’s round trip distance could
be used to proxy the recreation trip price, so that consumer’s surplus
estimates might be recovered. The idea was to obtain the net benefit
for outdoor recreation for a particular geographic area. The CVM
method was suggested in the same year in an article by
Ciriacy-Wantrup, although the first actual application of the method
(to deer hunting in Maine) was by Robert Davis in his Harvard PhD
dissertation, in 1963.

The new economics of outdoor recreation
Hanley, N. ;  Shaw, W. S ;  Wright, R. E. (2003)
Chapter free here
It seems like something very similar is possible here. For example, say you were asking about complementaries between the radio (which is free) and cars (which are not). You could look at hard of hearing people, and how demand changed for the radio as more and more expensive equipment is required to listen to the radio.
Or consider evaluating if public schools and Disney World are complements or substitutes. Using distance from school as a proxy for the variation in the cost of &quot;consuming&quot; school, you could use that variation to trace out the cross-price elasticity of Disney with respect to school.