GithubHelp home page GithubHelp logo

jipiboily / forwardlytics Goto Github PK

View Code? Open in Web Editor NEW
58.0 7.0 7.0 677 KB

[DEPRECATED & UNMAINTAINED] Take events and customer data in and send them to various providers, mostly analytics providers.

Home Page: https://jipiboily.com/

License: MIT License

Go 99.98% Procfile 0.02%
segment-equivalent drip intercom mixpanel analytics drift hacktoberfest

forwardlytics's Introduction

[DEPRECATED] This project is not maintained anymore nor used by the original author.

Forwards analytics events and identification to various marketing & analytics platforms.

You can send events to Forwardlytics, and it will forward it to the configured services like Intercom or Drip.

Looking for a Forwardlytics client library? There is one for Ruby just here.

Status

Where are we at? Can you use it in production?

[DEPRECATED] This project is not maintained anymore nor used by the original author.

Build Status

Installation

  • go get github.com/jipiboily/forwardlytics

  • set FORWARDLYTICS_API_KEY=SOMETHING_YOU_DECIDE_AND_NO_ONE_CAN_GUESS

To send to Intercom:

  • set INTERCOM_APP_ID=456

To send to Drip:

Please note that you need to send an "email" property to be able to get the Drip integration working.

To send to Drift:

  • set DRIFT_ORG_ID=456 (ATM only possible to find by contacting the drift support dept)

Mixpanel is probably going to be next.

Deployment

Forwardlytics can be deployed to Heroku. You can setup the port it starts on by setting the PORT environment variable.

Error tracking

Right now Forwardlytics supports tracking error via Bugsnag. Thanks to Logrus, it's pretty easy to add any other bug tracker. PRs welcome.

Retrying calls on failure

Forwardlytics has a built-in retry-mechanism than can be enabled should calls to a provider fail. To enable this, set the environment variable NUM_RETRIES_ON_ERROR=X where X is the number of retries to attempt before giving up. This is implemented as an exponential backoff algorithm.

Bugsnag config

To enable Bugsnag, set those environment variables:

BUGSNAG_API_KEY=your-api-key-123
ENVIRONMENT=development

If the environment is not set, it'll work but defaults to development.

You need an integration that doesn't exist yet?

You have two options:

How to add a new integration

To add a new integration you need to add a package that implements the Integration interface to a separate folder in the integrations/ subfolder of this project, usually named after the integration. The integration should be toggled by adding an ENV-variable that is picked up by the Enabled()-function in the intexgration and that is passed to forwardlytics on startup. To activate the new integration, add the path to the new integration in the import-statement in main.go. Remember to add an init() function to the new package that registers the new integration using integrations.RegisterIntegration(<integration-name>, integration). For examples, see the different integrations in the integrations/ subfolder (eg. the drip-integration). Don't forget to add tests for all endpoints and for other integration spesific stuff.

Calling the API

cURL example:

curl --request POST \
--header "Content-Type: application/json" \
--header "Forwardlytics-Api-Key: 123ma" \
-d '{"userID":"123", "userTraits":{"number_of_things":"42"},"timestamp":1459532831}' http://localhost:3000/identify

See ./integration/integration.go for details of what is accepted by the API.

Development

Note that you should install Godep if you are going to add any dependency to this project.

  • FORWARDLYTICS_API_KEY=somevalue go run main.go

If you want auto reloading, install codegangsta/gin and run:

  • FORWARDLYTICS_API_KEY=somevalue gin -a 8080 -t .

You need to set environment variables for the integrations you want to work with.

Running tests

go test -v ./...

Why?

Read "Self-hosted Segment equivalent?" on Medium

Thanks!

Thanks to my friend Julian for the logo! ๐Ÿ˜€

forwardlytics's People

Contributors

gableroux avatar helgeblod avatar jipiboily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

forwardlytics's Issues

Add a Deploy to Heroku button

Add all it needs to run, plus the free tier of LogEntries.

Ideally, make each integration optional.

Make Bugsnag optional.

Document how to add support for another bug tracker

Right now only Bugsnag is supported. Which works for Metrics Watch but not for everyone. Make it easier to add another one by documenting the process lightly.

Hint until then: look at the errortracker directory.

Add godoc

Badge and everything it needs to be useful.

add tests for the integration system, and everything

add tests for the plugin system, and everything else (why not before? This is a PoC, not sure the structure of the project and data will stay the same yet)

What I have in mind that needs to be tested and is not at the moment:

  • handlers/identify.go
  • integrtions/registry.go
  • integrtions/integration.go

Add error logging in Bugsnag (or equivalent)

TODO:

  • add decent logging all around (right now, the logs are empty if all is going well)
  • add error logging
  • send errors to Bugsnag (in my case, make it configurable as much as possible)

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.