Giter VIP home page Giter VIP logo

snippet.js's Introduction

Chameleon snippet.js

Build Status Circle CI Code Climate
npm version

#Getting started

Use it

  1. Copy index.min.js
  2. Replace {{ACCOUNT_TOKEN}} with yours from the Chameleon dashboard.
  3. Include it on all HTML pages (before the closing </head> tag)
  4. Include it only in production (even if you have a staging and/or test instances).
  5. For all private pages, call chmln.setup(userProperties)
  6. Deploy the app

chmln.setup spec

The chmln.setup call specifies a user identity that you reference across the user's lifetime. Every chmln.setup call must have a user id (UID) and time that the user was created.

Property Description
uid - required A unique identifier for the user in your database.
created - required The date the user's account was first created. Any date format will work.
email - recommended The email address of the user
plan - recommended Which plan a user falls under (i.e gold, startup, enterprise)
role - recommended The specific type of tasks this user can perform (i.e. owner, admin, member, billing)
spend - recommended The amount of monthly revenue generated by the user's account
  • Recommended properties are optional but are valuable.

Examples

Setup with email, plan and role properties:

chmln.setup({uid: user.id, created: user.createdAt, email: user.email, plan: 'gold', role: 'admin'});

Footnote: http://eschooltoday.com/ecosystems/scales-of-an-ecosystem.html Micro: A small scale ecosystem such as a pond, puddle, tree trunk, under a rock etc. Messo: A medium scale ecosystem such as a forest or a large lake.

snippet.js's People

Contributors

bnorton avatar hiaaroncody avatar

Watchers

James Cloos avatar Fayez Jawad 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.