Code Monkey home page Code Monkey logo

snippets-stats-proxy's Introduction

Snippets Stats Proxy

This software is part of an experiment to evaluate Google Analytics as a platform to collect, process and display snippet metrics data.

It collects requests from snippet actions (impressions, clicks and other) and proxies them to Google Analytics before redirecting the user to the current data collection pipeline at snippets-stats.mozilla.org.

Why this is proxy needed?

This proxy is came into existence to fulfill the following:

  1. Allow us to collect data in Google Analytics without directly sending users to Google. Instead browsers hit Mozilla managed cloud servers that run this proxy which in turn submit to GA limited amount of data as described in Data Collection Chapter of Snippets documentation.

  2. Allow us to maintain the current data collection pipeline while evaluating Google Analytics. The proxy receives the metrics and queues it to send it up to Google and then redirects browsers to the current data collection endpoint at https://snippets-stats.mozilla.org. The redirection is necessary because the current data collection pipeline extracts location information from IP before discarding it, therefore the ping must be made from the user's browser.

Parameters

  1. GOOGLE_ANALYTICS_ID

    Google Analytics ID to collect the data under. If unset no data gets send to GA.

  2. GOOGLE_ANALYTICS_URL

    Google Analytics endpoint URL. Defaults to https://ssl.google-analytics.com/collect

  3. MOZILLA_ANALYTICS_URL

    Mozilla Analytics endpoint URL. If unset return 200 OK instead of redirect. Defaults to https://snippets-stats.mozilla.org/foo.html

  4. STATSD_HOST, STATSD_PORT and STATSD_PREFIX

    Optional Statsd host, port and prefix to collect views and exception counts.

snippets-stats-proxy's People

Contributors

bookshelfdave avatar glogiotatidis avatar jgmize avatar mozilla-github-standards avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

snippets-stats-proxy's Issues

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.