All Projects → croct-tech → plug-js

croct-tech / plug-js

Licence: MIT license
The easiest way to collect, manage, and consume real-time data to fuel personalized experiences.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to plug-js

plug-react
React components and hooks to plug your React applications into Croct.
Stars: ✭ 76 (-26.21%)
Mutual labels:  personalization, croct
meilisearch-symfony
Seamless integration of Meilisearch into your Symfony project.
Stars: ✭ 65 (-36.89%)
Mutual labels:  integration
reedelk-runtime
Reedelk Runtime Platform Community Edition
Stars: ✭ 25 (-75.73%)
Mutual labels:  integration
one-sdk-js
1️⃣ One Node.js SDK for all the APIs you want to integrate with
Stars: ✭ 41 (-60.19%)
Mutual labels:  integration
DiffEqUncertainty.jl
Fast uncertainty quantification for scientific machine learning (SciML) and differential equations
Stars: ✭ 61 (-40.78%)
Mutual labels:  integration
MDSL-Specification
A domain-specific language to specify (micro-)service contracts, data representations and endpoints.
Stars: ✭ 35 (-66.02%)
Mutual labels:  integration
ltest
A Testing Framework for LFE (successor to lfeunit)
Stars: ✭ 31 (-69.9%)
Mutual labels:  integration
naas
⚙️ Schedule notebooks, run them like APIs, expose securely your assets: Jupyter as a viable ⚡️ Production environment
Stars: ✭ 219 (+112.62%)
Mutual labels:  integration
nosto-magento
Magento extension for Nosto
Stars: ✭ 28 (-72.82%)
Mutual labels:  personalization
groucho
Know all your users. Scalable front-end (anon) personalization & attribution
Stars: ✭ 31 (-69.9%)
Mutual labels:  personalization
FractionalCalculus.jl
FractionalCalculus.jl: A Julia package for high performance, fast convergence and high precision numerical fractional calculus computing.
Stars: ✭ 22 (-78.64%)
Mutual labels:  integration
visilabs-android
Visilabs Android SDK http://visilabs.com/
Stars: ✭ 43 (-58.25%)
Mutual labels:  personalization
bynder-php-sdk
SDK in PHP for integration with Bynder
Stars: ✭ 14 (-86.41%)
Mutual labels:  integration
ghidra-r2web
Ghidra plugin to start an r2 webserver to let r2 interact with it
Stars: ✭ 38 (-63.11%)
Mutual labels:  integration
reference-methodology
Integration projects today follow a time-consuming waterfall model, ill-suited to solving complex integration challenges. In response, WSO2 has developed organizational, project management, and technical expertise to help IT organizations transform integration projects to a more efficient and scalable continuous agile approach.
Stars: ✭ 46 (-55.34%)
Mutual labels:  integration
Dynatrace-OneAgent-Ansible
This Ansible role installs Dynatrace OneAgent.
Stars: ✭ 34 (-66.99%)
Mutual labels:  integration
mail2most
watch emails and send them to mattermost
Stars: ✭ 54 (-47.57%)
Mutual labels:  integration
docs-searchbar.js
Front-end search bar for documentation with Meilisearch
Stars: ✭ 128 (+24.27%)
Mutual labels:  integration
slim-doctrine
Slim-Doctrine managers integration
Stars: ✭ 16 (-84.47%)
Mutual labels:  integration
modules
Java & REST API's for creating and running integrations
Stars: ✭ 16 (-84.47%)
Mutual labels:  integration

Plug JS



Version Build Maintainability Coverage Gzipped Size


📦 Releases · 🐞 Report Bug · Request Feature

Overview

Plug JS is the easiest way to collect, manage, and consume real-time data to fuel personalized experiences. A single line of code gives you a fully-featured devkit for building natively personalized applications.

  • Zero configuration. No setup steps required.
  • No backend necessary. Deliver personalized experiences from static sites.
  • Fast queries. Double-digit millisecond latency for real-time evaluations.
  • Fully extensible API. Easily add and share new features via plugins.
  • Type-Safe. Typescript typings included.
  • Playground integration One-click to connect, no configuration needed.

Installation

There are two ways to install the Croct SDK:

NPM

The recommended way to install the SDK is via NPM. It pairs nicely with module bundlers such as Webpack or Browserify and includes Typescript typings.

In most cases, it should be as simple as running the following in your project:

npm install @croct/plug

Then, call croct.plug passing the App ID to initialize the SDK:

import croct from '@croct/plug';

croct.plug({appId: '<APP_ID>'});

Script Tag

To install the SDK as a script tag, add the following line to the <head> tag of your site on any pages you plan to use the SDK to personalize or track events:

<script src="https://cdn.croct.io/js/v1/lib/plug.js?appId=<APP_ID>"></script>
<script>croct.plug();</script>

You should replace the <APP_ID> placeholder with the respective App ID. For more information about the available options, see croct.plug.

Getting Started

🏖️ Just for your convenience
We will use CodePen throughout the tutorial to let you play with the examples right in your browser.

Follow the steps below to connect the playground with CodePen:

  1. Open the playground
  2. Click on the "Don't have an API Key?" link to proceed in sandbox mode
  3. Enter the URL https://codepen.io/pen
  4. Click on "Let's play!"

Connecting

💡️ Hint
You will typically use an API key to connect to your development, staging, or production environments in real cases, but you can also use a local URL, such as https://localhost/myapp.

Now, try evaluating the expression below:

user is returning

After clicking on the Evaluate button, you will see the result at the bottom of the page, which is either true or false depending on whether it is the first time playing with this example.

Let's now implement our first personalization feature. Click on the three-dots icon on the editor's top right corner and select "Open in CodePen". Then, copy the code below and paste into the HTML panel:

<button onclick="hey()">👋 Say hey</button>

<script>  
  function welcome() {
    if (confirm('Welcome! Do you want to take a look at our quick start guide?')) {
      window.open('https://croct.link/plug-js/quick-start');
    }
  }
  
  function welcomeBack() {
    if (confirm('Welcome back! How about joining us on Slack this time?')) {
      window.open('https://croct.link/community');
    }
  }
  
  function hey() {
    croct.evaluate('user is returning')
       .then(returning => returning ? welcomeBack() : welcome()); 
  }
</script>

Try clicking "👋 Say Hey", and you should see a personalized greeting.

🎉 Congratulations! You have successfully implemented your first personalization feature using Croct. For a more in-depth walk-through, check out our quick start guide.

Documentation

The following references provide guidance to help you get started, integrate, and troubleshoot problems:

If you are new to the Croct platform, the quick start guide is a good starting point for application developers to begin learning the essential concepts.

Support

If the troubleshooting section does not cover your problem, don't worry, there are alternative ways to get help from the Croct community.

Stack Overflow

Someone else from the community may have already asked a similar question or may be able to help with your problem.

The Croct team will also monitor posts with the "croct" tag. If there aren't any existing questions that help, please ask a new one.

GitHub

If you have what looks like a bug, or you would like to make a feature request, please open a new issue on GitHub.

Before you file an issue, a good practice is to search for issues to see whether others have the same or similar problems. If you are unable to find an open issue addressing the problem, then feel free to open a new one.

Slack Channel

Many people from the Croct community hang out on the Croct Slack Group. Feel free to join us and start a conversation.

Contributing

Contributions to the package are always welcome!

  • Report any bugs or issues on the issue tracker.
  • For major changes, please open an issue first to discuss what you would like to change.
  • Please make sure to update tests as appropriate.

Testing

Before running the test suites, the development dependencies must be installed:

npm install

Then, to run all tests:

npm test

License

This project is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].