Skip to content

Commit

Permalink
chore: slient install script analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBeucher committed Jan 6, 2025
1 parent a4f9497 commit 12fcb7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ DEFAULT_CLOUDYPAD_SCRIPT_REF=v0.11.0
CLOUDYPAD_HOME=${CLOUDYPAD_HOME:-"$HOME/.cloudypad"}
CLOUDYPAD_SCRIPT_REF=${CLOUDYPAD_SCRIPT_REF:-$DEFAULT_CLOUDYPAD_SCRIPT_REF}

INSTALL_POSTHOG_DISTINCT_ID="cli-install-$(date +%Y-%m-%d-%H-%M-%S)-$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 5)"
INSTALL_POSTHOG_DISTINCT_ID="cli-install-$(date +%Y-%m-%d-%H-%M-%S)-$RANDOM"
INSTALL_POSTHOG_API_KEY="phc_caJIOD8vW5727svQf90FNgdALIyYYouwEDEVh3BI1IH"

# Sends anonymous analytics event during installation
send_analytics_event() {
event=$1
if [ "$CLOUDYPAD_ANALYTICS_DISABLE" != "true" ]; then
curl -v -L --header "Content-Type: application/json" -d "{
curl -s -o /dev/null -L --header "Content-Type: application/json" -d "{
\"api_key\": \"$INSTALL_POSTHOG_API_KEY\",
\"event\": \"$event\",
\"distinct_id\": \"$INSTALL_POSTHOG_DISTINCT_ID\",
Expand Down

0 comments on commit 12fcb7b

Please sign in to comment.