Skip to content

paulojeronimo/snowplow-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Snowplow Tutorial

1. Introduction

In this tutorial, we will understand a little about Snowplow by running it locally. We will explore some examples in JavaScript and Java and, finally, adapt a WhatsApp bot’s code to use Snowplow.

Snowplow is the leader in next-generation customer data infrastructure (CDI), enabling every data-driven organization to own and unlock the value of its customer behavioral data to fuel AI, advanced analytics, and personalized experiences from their central data platform.

Thousands of organizations like Burberry, Strava, and Auto Trader rely on Snowplow to collect, manage, and operationalize real-time event data from their central data platform to uncover deeper customer journey insights, predict customer behaviors, deliver differentiated customer experiences, and detect fraudulent activities.

2. Getting started

$ docker run --rm -p 9090:9090 snowplow/snowplow-micro:2.1.2 \
  --output-tsv 2> /dev/null | tee data.tsv

References: [snowplow-micro]

2.1. Testing events sent through a Java application

$ mkdir examples && cd $_
$ git clone https://github.com/snowplow/snowplow-java-tracker.git
$ cd snowplow-java-tracker/examples/simple-console
$ ./gradlew jar
$ java -jar ./build/libs/simple-console-all-0.0.1.jar "http://localhost:9090"

2.2. Testing events sent through a React application

$ cd ~/labs/snowplow-tutorial/examples
$ git clone https://github.com/snowplow-incubator/snowplow-javascript-tracker-examples.git
$ cd snowplow-javascript-tracker-examples/react
$ yarn
$ yarn start

In the page http://localhost:3000/, configure the collector endpoint URI to http://localhost:9090.

2.3. Converting the generated TSV file to CSV

$ sudo apt -y install csvkit
$ csvformat -t < data.tsv > data.csv

3. Testing Snowbridge locally

$ docker run \
  --env SNOWBRIDGE_CONFIG_FILE="" \
  --env ACCEPT_LIMITED_USE_LICENSE=yes \
  -i snowplow/snowbridge:2.4.2 \
  < data.tsv > output.txt

The generated output adds some keys to the data. See them:

$ for key in PartitionKey TimeCreated TimePulled TimeTransformed
do
    echo searching $key ...
    grep $key output.txt
    read -p 'Press <ENTER>'
done

References: [snowbridge]

4. Behavioral data from a user interacting with a WhatsApp Bot

In this section, we will understand behavioral data through a user’s interaction with a WhatsApp bot. Then, we will modify the bot’s code to use Snowplow.

Here is the bot’s initial code: https://github.com/paulojeronimo/venom-bot1.

5. References

YouTube videos
  1. https://www.youtube.com/watch?v=zkarYQ63rvM
    Oct 24, 2022 - Behavioral Data Creation for AI | Snowplow Co-Founder & CEO Alex Dean

  2. https://www.youtube.com/watch?v=IsXpyt3hYcA
    Mar 19, 2022 - Snowplow: Alex Dean Session at the Open Source Data Stack Conference 2021

Snowplow documents and Git repositories
  1. snowplow-micro:

  2. snowplow-java-tracker:

  3. snowplow-javascript-tracker:

  4. snowbridge:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors