I got the feeling that this topic has not been interesting to anyone at all for the last 8 years. It is so uninteresting that even up-to-date manuals are gone.
Let's say I have a specific repository on Bitbucket for a free plan. I wanted to attach analytics to this repository in order, for example, to count visitors per day. But here's the trouble: I just can't figure out what exactly bitbucket needs and what needs to be configured in the google analytics account.
In the analytics profile, I created a property for which I configured Data Streams. I added only 1 item there: web-stream, where I indicated the address of the repository. After that I got some "Measurement Id" in the following form "G-ZKRTCUNL". What to do next with this? I have no idea. I took and copied "Measurement Id" to the "Google Analytics key" field in the repository settings - nothing worked.
How can I configure GA & repository so that visitors are counted?