# Logistic Regression Calculating Beta and Std Error; Effect of # of Trials

I'm hoping to get a better understanding of logistic regression. I have a dataset in which each participant encounters N number of items, each of which is scored as a success or a failure.

I first ran a regular GLM on the dataset, using
percent correct = success/(success + failure) as the DV.

As I understand it, this is a suboptimal analysis because it assumes that the DV values can extend to < 0 and > 1.

Therefore, logistic regression is required. Naively, I tried to perform the logistic regression by converting the DV to log odds by hand. In other words, if a participant had 8 out of 12 successes, I made their
DV value = log(8/4)
The procedure was a bit similar to what is shown here: http://vassarstats.net/logreg1.html

From this, I obtained a test statistic that was somewhat comparable to the regular GLM.

Next, I performed the logistic regression in R, coding each trial as a binary, using the following function call:
glmer(success ~ condition + (1|sub) + (1|item), data = d.data, family='binomial', control = glmerControl(optimizer = "bobyqa"), nAGQ = 1)

This gave me very different results from the manual logistic regression and the regular GLM.

I understand that the straightforward conversion to log odds is not always done in cases where an IV level has only 1 success or failure, because then the log odds is undefined or goes to infinity (i.e. Manually calculating logistic regression coefficient).

But this isn't the case for my dataset. Can you please help me to understand how the logistic regression is typically calculated? Is there an aspect to my "manual" calculation which is correct?

One thing a colleague pointed out is that, in my "manual" logistic regression, I don't account for the number of trials. I understand that the logistic regression in some way utilizes the binomial distribution.
From this POV,
p(8 or or more successes; in 12 trials; p=0.5) >> p(80 or more successes; in 120 trials; p = 0.5)

Is the number of trials utilized in determining the standard error of the logistic regression, but not the Beta? If so, how is it calculated and how does it relate to the binomial distribution?