New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@letscooee/web-sdk

Package Overview
Dependencies
Maintainers
2
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@letscooee/web-sdk

Hyperpersonalised Mobile/Web App Re-Engagement via Machine Learning

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
378
increased by62.23%
Maintainers
2
Weekly downloads
 
Created
Source

Cooee Web SDK

GitHub version

👋 What is Cooee?

Cooee powers hyper-personalised and real time engagements for mobile & web apps based on machine learning. The SaaS platform, hosted on cloud infrastructure processes millions of user transactions and data attributes to create unique and contextual user engagement triggers for end users with simple SDK integration that requires no coding at mobile app level.

🛠 Installation

We at Cooee believe in the developer productivity and that's how our SDKs are written. The installation should take you no more than two hours. Period!

Use via CDN

Following are the guidelines for installing Cooee SDK on to your Android mobile app.

Step 1: Load SDK Asynchronously

We recommend loading the SDK with the async flag so your page load time don't increase. To use it, place the following code before calling any other CooeeSDK functions.

<script src="https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@latest/dist/sdk.min.js" async></script>
<script>
    window.CooeeSDK = window.CooeeSDK || {events: [], profile: [], account: []};
    CooeeSDK.account.push({"appID": "MY_COOEE_APP_ID"});
</script>

Replace MY_COOEE_APP_ID with the app id as seen in your Cooee dashboard.

Step 2: Track Custom Events

Once you add the above snippet, the SDK will automatically start tracking some default event. Apart from these, you must track the given recommended events based on your industry.

CooeeSDK.events.push(["Add To Cart", {
    item: {
        id: "15234",
        name: "Shoes"
    }
}]);
Step 3: Update User Profile

Additional custom attributes/properties can also be shared. We encourage apps to share all properties for better machine learning modelling.

CooeeSDK.profile.push({
    name: "John Doe",
    email: "john@example.com",
    mobile: "9876543210",
    loggedIn: true,
    foo: "bar",
    subscriptions: {
        valid: true,
        pack: 1234
    }
});
Step 4: CTA Callbacks

Cooee SDK supports callback on the click of in-app notifications actions by returning a map of key-value pairs i.e. objects in JavaScript.

document.addEventListener('onCooeeCTA', function (event) {
    const payload = event.detail;
    
    if (!payload) return;

    if (payload.actionType === "VIEW_ITEM") {
        // Take the user to the given item's page. Item id will be in "payload.id"
    } else if (payload.actionType == "GO_TO_SCREEN") {
        // Take user to the given screen name
    }
}, false);

Keywords

FAQs

Package last updated on 03 Feb 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc