Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠

Gurdas Nijor gurdasnijor

🤠
View GitHub Profile
View journey-v2.json
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema",
"definitions": {
"statesObject": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
View insert-journey.sql
INSERT INTO journeys (id, workspace_id,space_id,`key`,name, description,enabled, definition)
VALUES ('trial_conversion', 'fUWqmMQQC1M4ALKaerfQxx', 'fUWqmMQQC1M4ALKaerfQxx', 'trial_conversion', 'Trial Conversion', 'Convert to paying users', true, '{
"version": "2.0.0",
"id": "trial-conversion",
"initial": "non_converted_trials",
"key": "journey_def_v3.1",
"states": {
"non_converted_trials": {
"meta": {
"name": "Non-converted Trials",
@gurdasnijor
gurdasnijor / cart-abandonment.json
Last active Jan 24, 2021
cart abandonment #journey-v2
View cart-abandonment.json
{
"version": "1.2.0",
"initial": "visited_site_without_adding_to_cart",
"key": "journey_def_v3.1",
"states": {
"visited_site_without_adding_to_cart": {
"meta": {
"type": "audience",
"audience_ast": {
"children": [
View cart-abandonment.json
{
"version": "1.2.0",
"initial": "visited_site_without_adding_to_cart",
"key": "journey_def_v3.1",
"states": {
"visited_site_without_adding_to_cart": {
"meta": {
"type": "audience",
"audience_ast": {
"children": [
View jourenycreaterpc.json
{
"jsonrpc": "2.0",
"id": 1,
"method": "Journeys.Create",
"params": {
"spaceId": "spa_1mkMoi0PxXlBQEHLGIRZm6MDRtk",
"workspaceId": "fUWqmMQQC1M4ALKaerfQxx",
"journey": {
"key": "gurdas_test_3",
"name": "Gurdas Test GQL 3",
@gurdasnijor
gurdasnijor / createjourney.graphql
Last active Jan 22, 2021
create journey mutation
View createjourney.graphql
mutation {
createJourney(
workspaceId: "fUWqmMQQC1M4ALKaerfQxx",
spaceId: "spa_1mkMoi0PxXlBQEHLGIRZm6MDRtk",
input: {
description: "a cool descript",
key: "some_key",
name: "cool journey",
definition: {
version: "1.2.0"
View journey2323.json
{
"version": "1.2.0",
"initial": "visited_site_without_adding_to_cart",
"key": "journey_def_v3.1",
"states": {
"visited_site_without_adding_to_cart": {
"meta": {
"type": "audience",
"audience_ast": {
"children": [
View machine.js
const fetchMachine = Machine( {
initial: 'viewed_homepage',
states: {
viewed_homepage: {
meta: {
type: 'audience',
audience_ast: { }
},
after:[
{
View machine.js
const fetchMachine = Machine( {
initial: 'viewed_homepage',
states: {
viewed_homepage: {
meta: {
type: 'audience',
audience_ast: { }
},
after:[
{
View machine.js
const signupJourney = Machine(
{
"key": "cart-abandoned",
"initial": "added_sneakers",
"states": {
"added_sneakers": {
"on": {
"DIDNT_BUY_SUPREME_ENTERED": "didnt_buy_supreme"
},
"meta": {