Giter Site home page Giter Site logo

findhotel / analytics.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from segmentio/analytics.js

0.0 6.0 0.0 9.5 MB

The hassle-free way to integrate analytics into any web application.

Home Page: https://segment.com/libraries/analytics.js

License: MIT License

Makefile 0.34% JavaScript 99.56% HTML 0.05% Dockerfile 0.05%
analytics

analytics.js's Introduction

Analytics.js - FindHotel Fork

This is a fork of the popular segment javascript sdk for tracking user events.

Background

Major differences between this fork and the official repo

a great a bulk of the work was done on packaging this a product FE developers can use out of the box. There are probably many things that can be done in order to make this packaging better like using webkit and removing unnecessary dependencies.

The other major different between this repo and the official one is that in this one the Segment.io integration was changed to send data to our alooma endpoint.

Steps to build this repo

  1. Build using make analytics.js - note this applies some changes to a subdependency via a git apply. The changes it's applying are these: https://github.com/FindHotel/analytics.js/commit/bd670d1912a8e5b7d9b3146aacb1ac7fcad8eaa1#diff-eef26edac842c7b555a54ea995dc2cb533e6b2470f22631ee9f876ce15bfc2c5L5673

  2. Once inspected to work fine, build using make analytics.min.js

Usage:

  1. init the analytics
analytics.initialize({"Segment.io":{ apiKey: '' }})
  1. send events
analytics.page()
  1. for full documentation please see: https://segment.com/docs/sources/website/analytics.js/

Known Caveats

  1. The current alooma endpoint does not expose CORS correctly,

you can use the nginx-proxy directory to build a nginx proxy that bypasses this

cd nginx-proxy
docker build -t nginx-proxy .
docker run  -p 8088:8088 nginx-proxy
  1. Instead of overriding the segment.io endpoint we could implement our own integration, although this doesn't seem necessary

analytics.js's People

Contributors

aliceathens avatar amillet89 avatar araddon avatar azcoov avatar bialecki avatar billyvg avatar buger avatar calvinfo avatar coryvirok avatar dangrossman avatar devangpaliwal avatar dkador avatar dominicbarnes avatar f2prateek avatar gerrit88 avatar ianstormtaylor avatar jede avatar jessbrandi avatar jopdeklein avatar koushan avatar lancejpollard avatar mchail avatar ndhoule avatar nscott avatar philfreo avatar reinpk avatar robv avatar simontabor avatar sperand-io avatar yields avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.