Skip to content

Instantly share code, notes, and snippets.

View cborodescu's full-sized avatar
💭
#givefirst

Ciprian Borodescu cborodescu

💭
#givefirst
View GitHub Profile
[
{
"segmentID": "segment_1",
"name": "Mobile users that will complete a purchase",
"conditions": "predictions.funnel_stage.value:transaction AND (predictions.funnel_stage.probability: 0.5 TO 0.9) AND raw.device = 'mobile'",
"type": "computed"
},
{
"segmentID": "segment_3",
{
"user": "user_1",
"properties": {
"raw": {
"lastUpdatedAt": "2021-07-11T10:12:37Z",
"device": "mobile",
"sessionCount": 12,
"timeOnSite": "02:03:10",
"browser": "chrome",
"pageviews": 32,
[
{
"name": "Related Products",
"type": "related_products",
"compatibleSources": ["bigquery"],
"dataRequirements" : {
"minUsers": 10000,
"minDays": 90
},
"frequency" : “weekly”
intents.cart_abandonment.probability: 0.5 TO 0.9
AND intents.next_order_value.value >= 50
AND intents.affinities.brand.value = “adidas”
AND intents.affinities.brand.probability > 0.5
{
"user": "user_123",
"intents": [
{
"intent-type": "goals",
"value": [
{
"name": "product_view",
"probability": 0.56
},
@cborodescu
cborodescu / user-data-profiles.json
Last active October 6, 2022 10:52
User-Data Profiles
[{
"user": "user-123",
"informational-profile": {
"properties": {
"raw": {
"device": "mobile",
"sessionCount": 12,
"timeOnSite": "02:03:10",
"browser": "chrome",
"pageviews": 32,
function Recommendations({ cartValue }) {
const { nextCartValue } = useNextCartValue();
return (
// Products with prices that do not exceed ${nextCartValue}
);
}
function App({ api }) {
const nextCartValue = api.getNextCartValue();
@cborodescu
cborodescu / gist:b130da80aa87343fe032206f0a023be1
Last active February 15, 2022 12:58
User Intent Graph - Search App
function SearchListing({ results }) {
const { affinities } = useAffinities();
const categoryAffinity = affinities.find((x) => (x.name = "category"));
const brandAffinity = affinities.find((x) => (x.name = "brand"));
const colorAffinity = affinities.find((x) => (x.name = "color"));
return (
// Display results that match category, brand and color affinities
);
@cborodescu
cborodescu / gist:a971888ae115b378f755b1e74869f890
Last active February 13, 2022 12:38
REST API for User Intent Graph
{
"user": "user_123",
"intents": [
{
"intent-type": "goals",
"value": [
{
"name": "product_view",
"probability": 0.56
},
npm install
bower install
gulp
gulp watch (optional, if you want the app to refresh with the latest changes)
ionic serve