triplewhale-stats

<h1>For using on both client and backend :tada: </h1> <br> <br> For new version release only run this: `npm run release --message="GIT MESSAGE HERE"`; don't forget to update both client and backend/functions with `npm i triplewhale-stats@latest` for clien

Usage no npm install needed!

<script type="module">
  import triplewhaleStats from 'https://cdn.skypack.dev/triplewhale-stats';
</script>

README

For using on both client and backend :tada:



For new version release only run this: `npm run release --message="GIT MESSAGE HERE"`; don't forget to update both client and backend/functions with `npm i triplewhale-stats@latest` for client and `npm i triplewhale-stats@latest --prefix functions` on backend;


Metric addition steps (`snapchat_impressions` for example)

  • in triplewhale-backend/{snapchat_api}/ add 'impressions' in metrics array
  • in triplewhale-modules/stats/index.js add `snapchat_impressions` reducer
  • in triplewhale-modules/stats/index.js add `snapchat_impressions_chart` reducer
  • commit changes and do `npm run release` , then install package in client and backend
  • in triplewhale-modules/metrics/index.js add new metric, set its id, metricId (reducer id) and chart id
  • commit changes and do `npm run release` , then install package in client and backend
  • in triplewhale-backend/compareStats.js add metricId
  • in triplewhale-client/constants/summarySections.js add metric under relevant section
  • in triplewhale-client/components/SummarySection.js add summary box (use metric id and reducers ids for box property values)