igrigorik / ga-beacon Goto Github PK
View Code? Open in Web Editor NEWGoogle Analytics collector-as-a-service (using GA measurement protocol).
License: MIT License
Google Analytics collector-as-a-service (using GA measurement protocol).
License: MIT License
Looks like App Engine isn't happy, e.g. https://ga-beacon.appspot.com/UA-12846745-20/google-maps-services-java/readme?pixel displays a web page with this text:
Over Quota
This application is temporarily over its serving quota. Please try again later.
Hello,
I would like to report two issues that I found yesterday:
Thank you for the awesome work!
I always put in my own IP in google analytics filter settings as exclusion from the stats. This work on my other sites. It seems this tracking code is logging the traffic anyway but it seems to know correct country. I don't understand? It says in your description in can detect unique users and IP?
I have to embed the code into all README.md in all my repositories? Is there an easier way - embed it only in one repository? After, when it's forked, the code will track the person who's forked it.
Hi,
Thanks to provide this useful tool!
I found the tool only count the number of visitors every day, so I just wondering is it possible to track the city/country of the visitors of my repository from google analysis?
Thanks
Flat style for GA beacon badge does not work as stated in #19.
Visiting https://ga-beacon.appspot.com/UA-71196-10/ga-beacon/readme?pixel is showing an error page like this:
Not sure what kind of quota is running out. Will the site be up again after few hours or few days?
Thanks
What does this mean for this service? Can you provide any more than GitHub can?
https://github.com/blog/1672-introducing-github-traffic-analytics
From the Measurement Protocol policy:
You will give your end users proper notice about the implementations and features of Google Analytics you use (e.g. notice about what data you will collect via Google Analytics, and whether this data can be connected to other data you have about the end user). You will either get consent from your end users, or provide them with the opportunity to opt-out from the implementations and features you use.
?pixel
version, users will not be properly notified that they are being tracked by ga-beacon (although one could manually add a proper notice to the web page or email that is being tracked).Does that mean that using ga-beacon violates the Google Analytics / Measurement Protocol policy?
You're showing the IP of the GitHub proxy that loads the image instead of the user's IP address. Are your list of trusted proxies correctly configured so that you're reading the correct IP addresses?
I'm able to see visitors in the RealTime reporting dashboard but all other dashboards read zero visits. Is that a limitation of this approach? Or can I generate POST data that will light up the other dashboards?
Should there be a dh
parameter? The docs say:
For 'pageview' hits, either &dl or both &dh and &dp have to be specified for the hit to be valid.
I tried adding dh
but no luck. Tried just dl
. Still no luck.
Thanks!
Chris
I have read remove github example from readme · igrigorik/ga-beacon@6acd862, but also found the instructions below from Gistguide.github.io by wallydrag and similar content from somewhere else. I guess the posts and blogs are out-dated or wrong, is that true?
You can use Google Analytics to measure the traffic to your Gists. Since Github does not allow JavaScript code to run inside plain text Gists, we can use the GA Beacon https://github.com/igrigorik/ga-beacon to log visits in real-time to Gists.
Add this line to your Gists, save in Markdown format and it will add a transparent tracking image to your Gists.
![Analytics](https://ga-beacon.appspot.com/UA-XXXXX-X/gist-id?pixel)
First, thank you for the work! Trying to get the free version working before I clone the repo but I'm not sure this is working anymore, for instance, this tracker yields nothing https://ga-beacon.appspot.com/UA-109XXXXXX-1/mycv/ (I put the X's in there)
Github just launched GitHub Traffic Analytics which do most of the job of ga-beacon, so it would be cool to mention it in the README to alert users that now there's a built-in solution :)
related: https://github.com/blog/1672-introducing-github-traffic-analytics
Hello,
I've been using this beacon recently, and have seen that the hits only show on a View that does not have "Bot Filtering?" option checked. Thats the only difference between the Raw and normal view.
David Vallejo suggested it may have something to do with the headers that are sent with the request?
This also seems to have started recently, perhaps related to changes with how GA handles spam event bots?
I create a git in github, what's the {your-repo} and {page-name} ?
Hi,
Im having trouble adding the URL to my google docs. I have confirmed that
https://ga-beacon.appspot.com/UA-87927789-1/CorsairManual
does send a tag to my google account but I cant seem to get the image inserted.
We've been running this app for the last couple of years with great success. I saw the recent updates to the project to support running on Go 1.12+ but am unable to to deploy it successfully.
After doing some digging it appears that the issue is that the package "appengine" is deprecated with Go 1.12. Is there a way to deploy with 1.12 or 1.13 or does that require a re-write of the main app?
The badges seems to not work . i am seeing error 503 Over Quota
This application is temporarily over its serving quota. Please try again later.
Could this be fixed somehow?
This is all I get in my dashboard when using this from a google spreadsheet.
The referrer url leads to a shopping site and is apparently from Russia.
Not sure if the script has been compromised or I am having a different issue.
I using the following formula in a google spreadsheet:
=IMAGE("https://ga-beacon.appspot.com/UA-XXXXXX-X/alasdairs-week/aug-14")
Thanks for any clues,
Alasdair
https://github.com/igrigorik/ga-beacon/blob/master/ga-beacon.go#L48
confused on that line
I used this project to setup some beacons, but realized recently that google now can host its own beacons from its measurement protocol - see here: https://developers.google.com/analytics/devguides/collection/protocol/v1/email#overview
I think ga-beacon is still useful if you would like to intercept and store data on your own server but also report it to google analytics, but it is probably better if you want simple beacons to just use google's version directly.
Hi, first thanks for this awesome repo.
When i use : https://ga-beacon.appspot.com/UA-XXXXXXXX-Y?pixel&useReferer
as url i can see hits in GA
But as soon as i append a path https://ga-beacon.appspot.com/UA-XXXXXXXX-Y/joal-readme?pixel&useReferer
, there is no more hits in GA.
I tested both URL in chrome.
Greets, i have been using it at my spreadsheet, but stopped working. I haven't changed anything, it just stopped working. Double checked everything, made a new spreadsheet, used even example one, no. It just stopped working and cant get it to work.
https://mashe.hawksey.info/2014/02/tracking-google-sheet-views-with-google-analytics/
Taken information from there.
https://docs.google.com/spreadsheets/d/1TXym5_hkoGBOhB9lWucAcAv4-7MWY50zzSJBILYa0Bs/edit#gid=0
This is the one i have used for testing, if you could help, much appreciated.
I just came across this repo. Is cross domain tracking possible? We provide web services to financial institutions and we would like to record "conversions" that start on their website but actually convert on a third-party web app. Although the web app allows us to use GA, they do not allow us to modify the snippet at all.
Thanks!
I have a beacon installed on project cinecove/defunctr here at github. It's been on the readme.md page for a few days now (around 5). Google Analytics is not recording any traffic though. Nothing at all. I have verified that the url is set correct and that the id is correct. Am I missing something I should be checking?
Thanks
It would be really nice to have a transparent pixel tracker option.
That could be useful on wiki pages &c.
Go 1.9 is no longer available. Please refer to https://goo.gl/aESk5L for more information.
There should be a disclaimer that GA Real-Time analytics is not actually in real time. In other words, once you have added the GA beacon, don't expect the numbers to pop up in the real-time analytics dashboard immediately. There is generally a lag of between a couple hours up to 24 hours before you can see your metrics. However, this might help:
http://blogote.com/ideas/forcing-google-analytics-to-show-real-time-data/168/
How about adding this to the available badges?
https://img.shields.io/badge/analytics-GA-blue.svg?style=flat-square
Since few days i get no data from beacon images to analytics. Anyone else has same problem?
Thanks for making ga-beacon. In my GA dashboard it appears that all my traffic is routing through one location. Is it not possible to get accurate geo info?
Is it possible to pass a page title to GA-Beacon, to make it easier to read some of the GA reports?
This could be done by adding a query string with the desired title.
http://ga-beacon.appspot.com/UA-XXXXXXX-1/path/page.htm?pixel&title=Tracked%20Page%20Title
Hi
I have been trying out ga.beacon to track email opens but have run into a bit of an issue.
I saw my test opens appear in the real time data however Analytics doens't seem to be recording the total pageviews.
I don't have amazing coding skills (HTML is about my limit at the moment). Can you help?
Many thanks,
b
hope fix
Is it important that the request for the image be made via HTTPS, or does HTTP work equally well?
I'm considering using this to help track email open rates, and I'm thinking that an HTTP image request is less likely to have any kind of security warnings than is an HTTPS request.
First of all, thank you for creating this repo.
I just want to add some ideas that is custom image which can derived from the url.
Like this example
<img src="https://ga-beacon.appspot.com/UA-XXXX-X/landing-page?image=https://example.com/example.jpg">
Which will fetch image from the specified url replacing the badge.
Or maybe we can implement from the app itself.
Thank you. And once again, it's just idea.
Can you create a Dockerfile so we can build and run without any knowledge of GAE or Go Lang?
I realize the main use-case is restricted applications where you don't have access to any JavaScript. But it
could be useful to support other hit types such as events for times where a declarative setup is desired.
Perhaps an API such as:
https://ga-beacon.appspot.com/UA-XXXXX-X/event?category=____&action=____&label=____&value=____
This would allow projects like MemSnap to easily publish memory use statistics over time to Google, with a url like:
memSnap(this, 'https://ga-beacon.appspot.com/UA-XXXXX-X/event?category=Mem&action=Snap&label={lbl}&value={use}
Thoughts?
GitHub is use Camo to cache the images, how accurate is the tracking information when the image is not served directly?
https://help.github.com/articles/about-anonymized-image-urls/
hides your browser details and related information from other users.
Sorry for getting in touch via this forum.
We intend to use your service for a few months and this might cause an overload. Knowing that you cannot guarantee the service will run properly in the long run in case of overload, we wanted to make sure it is ok for you if we use your service for an estimated 20 million page views a year ?
Looking forward to hearing from you,
Regards.
Thank you for letting us know if that's of any problem for you
Hi, Ilya -
Thanks for building such a handy tool!
I'm experimenting with it as a way to help measure traffic to partner pages that won't run my Google Tag Manager code.
I currently use the Tag Manager and Google Analytics on multiple domains, so that I can view visitors as they travel between my various related websites.
For this reason, I want to be able to capture the domain name as well as the page name and path. I then have a filtered view that includes the domain name in the GA reporting, so I can tell what site the page is on.
https://support.google.com/analytics/answer/1034342?hl=en
I notice that GA-Beacon puts a slash ("/") at the front of the page name, but it does not include the domain information. So it looks correct in a single-domain GA setup, but does not work as cleanly in a cross-domain environment where it puts a slash in front of the domain name I include in my beacon URL.
It would be great if the tool could accommodate including a domain in the URL, and somehow pass that information through to GA correctly.
Hi,
I'm trying to deploy this beacon on my own GCP app engine. The repo says:
Deploying your own instance is trivial: fork this repo, modify the project name in app.yaml, and follow the normal GAE deploy instructions. You should be up and running in less than five minutes.
But this doesn't seem to work for me.
After modifying the app name, I get the following error when doing gcloud app deploy
:
ERROR: (gcloud.app.deploy) The [application] field is specified in file [/home/mikel/ga-beacon/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by
gcloud config set project MY_PROJECT
or by setting the--project
flag on individual command executions.
The same error appears about the version field. If I comment both fields out at the top of the yaml and specifying the project with --project I no longer get this error, however, I get the following error:
ERROR: (gcloud.app.deploy) Staging command [/usr/lib/google-cloud-sdk/platform/google_appengine/go-app-stager /home/mikel/ga-beacon/app.yaml /home/mikel/ga-beacon /tmp/tmpgyTDyh/tmpjjKhHK] failed with return code [1].
------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2017/07/30 00:01:28 failed analyzing /home/mikel/ga-beacon: could not get package for dir "/home/mikel/ga-beacon": no buildable Go source files in /home/mikel/ga-beacon
GOPATH: /home/mikel/go
--------------------------------------------------------------------------------
It seems to be a problem with the fact that the go files are in a subdirectory but gcloud is only looking in the directory where the app.yaml is. I'm not familiar with app engine so I feel like this is an easy fix but I'm not sure what to do.
I've tried moving all the files from the ga-beacon
subdirectory into the main directory, and while this does deploy, I simply get a internal error occured page when I try to go to the page.
I'm running Google Cloud SDK 164.0.0 on Ubuntu 14.04.
Thanks
Hello,
I am using my own implementation of ga-beacon for my project in order to measure traffic to third party pages (mostly partners blogs).
The thing that puzzles me is that I observe a great amount of direct traffic to the img src link. I am trying to find the origin of that traffic and I believe that it may be caused by robots, since the measurement protocol is used to send the traffic data.
The google analytics support page mentions:
The Google Analytics JavaScript only sends data to Google Analytics when JavaScript is enabled. Because most search engine robots do not activate JavaScript, robot traffic is not counted in Analytics when using a JavaScript tracking method.
If the search engine that crawls your site does activate JavaScript, or if you specifically configure your website server files to send the Analytics tracking beacon, you will receive search engine robot data in your reports.
Any suggestions for that matter? Should I only count the refferal traffic from the page the snippet is in, just to be safe? Is there another way to identify the nature of that traffic (and robots)?
Thanks for your work!
To be on the safe side of GitHub image caching I think it's better to add the "ETag" header (or "Expires").
See github/markup#224 (comment) and github/markup#224 (comment) and github/markup#224 (comment).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.