Socket
Socket
Sign inDemoInstall

snippet.js

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    snippet.js

The JavaScript snippet for Chameleon


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Install size
28.2 kB
Created
Weekly downloads
 

Readme

Source

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.

PropertyDescription
uid - requiredA unique identifier for the user in your database.
created - requiredThe date the user's account was first created. Any date format will work.
email - recommendedThe email address of the user
plan - recommendedWhich plan a user falls under (i.e gold, startup, enterprise)
role - recommendedThe specific type of tasks this user can perform (i.e. owner, admin, member, billing)
spend - recommendedThe 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.

Keywords

FAQs

Last updated on 20 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc