From f6152d8f93324b02db2577e2db180526234881f3 Mon Sep 17 00:00:00 2001 From: Sameen Karim Date: Mon, 19 Aug 2024 17:31:07 -0400 Subject: [PATCH] github action workflow for publishing to npm --- README.md | 5 ++ package.json | 2 +- tracking-schema.yaml | 145 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 tracking-schema.yaml diff --git a/README.md b/README.md index 88e0ef1..6586539 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # @flisk/analyze-tracking + Analyzes tracking code in a project and generates data schemas +[![Build Status](https://github.com/fliskdata/analyze-tracking/workflows/npm-publish/badge.svg)](https://github.com/fliskdata/analyze-tracking/actions) +[![NPM version](https://img.shields.io/npm/v/@flisk/analyze-tracking.svg)](https://www.npmjs.com/package/@flisk/analyze-tracking) + + ## Usage ```sh npx @flisk/analyze-tracking /path/to/project diff --git a/package.json b/package.json index cf5c089..487c8c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flisk/analyze-tracking", - "version": "0.1.0", + "version": "0.1.1", "description": "Analyzes tracking code in a project and generates data schemas", "main": "src/index.js", "bin": { diff --git a/tracking-schema.yaml b/tracking-schema.yaml new file mode 100644 index 0000000..989462f --- /dev/null +++ b/tracking-schema.yaml @@ -0,0 +1,145 @@ +version: 1 +events: + orderCompleted: + sources: + - repository: unknown + path: checkout.ts + line: 120 + function: handler + - repository: unknown + path: main.js + line: 18 + function: test + destinations: + - segment + - mixpanel + properties: + timestamp: + type: any + order_id: + type: any + total_amount: + type: number + currency: + type: any + items: + type: string[] + payment_method: + type: any + shipping_address: + type: object + properties: + street: + type: string + city: + type: string + state: + type: string + postal_code: + type: number + country: + type: string + customer: + type: object + properties: + customer_id: + type: any + email: + type: any + first_name: + type: any + last_name: + type: any + newsletter_opt_in: + type: any + number_of_past_orders: + type: any + phone_number: + type: any + last_order_id: + type: any + default_payment_method: + type: any + created_at: + type: any + updated_at: + type: any + products: + type: any + total: + type: any + login: + sources: + - repository: unknown + path: main.js + line: 27 + function: checkout + - repository: unknown + path: main.js + line: 74 + function: checkout2 + - repository: unknown + path: main.js + line: 96 + function: checkout3 + - repository: unknown + path: main.js + line: 107 + function: global + destinations: + - amplitude + properties: + order_id: + type: any + products: + type: any + total: + type: any + address: + type: object + properties: + city: + type: string + state: + type: string + someevent: + sources: + - repository: unknown + path: main.js + line: 37 + function: checkout + destinations: + - snowplow + properties: + category: + type: string + action: + type: string + label: + type: string + property: + type: string + value: + type: number + purchase: + sources: + - repository: unknown + path: main.js + line: 46 + function: checkout + destinations: + - googleanalytics + properties: + order_id: + type: any + products: + type: any + total: + type: any + address: + type: object + properties: + city: + type: string + state: + type: string