How to use sketch-module-google-analytics - 3 common examples

To help you get started, we’ve selected a few sketch-module-google-analytics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathieudutour / git-sketch-plugin / src / analytics.js View on Github external
export function sendEvent (context, category, action, label, value) {
  const { sendAnalytics } = getUserPreferences(context)
  if (!sendAnalytics) { return }
  const payload = {}
  if (category) { payload.ec = category }
  if (action) { payload.ea = action }
  if (label) { payload.el = label }
  if (value) { payload.ev = value }

  return send(context, key, 'event', payload)
}
github mathieudutour / git-sketch-plugin / src / analytics.js View on Github external
export function sendError (context, error) {
  const { sendAnalytics } = getUserPreferences(context)
  if (!sendAnalytics) { return }
  return send(context, key, 'event', {exd: error})
}
github konki-vienna / sketch-bootstrap-helpers / src / bootstrap_helpers.js View on Github external
import { displayMessageToUser } from './common';
import myGoogleAnalytics from 'sketch-module-google-analytics';
myGoogleAnalytics.kUUIDKey = "UA-134337717-1"

const sketch = require('sketch'),
      UI = require('sketch/ui')
var document = require('sketch/dom').getSelectedDocument(),
    doc = NSDocumentController.sharedDocumentController().currentDocument(),
    bootstrapSize,
    gridTotalWidth,
    gridColumnWidth,
    gridGutter = 15,
    gridGroupName = "CU$T0M-GR1D",
    myFillColor = "#FF33CC59", //100% — FF, 95% — F2, 90% — E6, 85% — D9, 80% — CC, 75% — BF, 70% — B3, 65% — A6, 60% — 99, 55% — 8C, 50% — 80, 45% — 73, 40% — 66, 35% — 59, 30% — 4D, 25% — 40, 20% — 33, 15% — 26, 10% — 1A, 5% — 0D, 0% — 00
    master,
    myDictionary = NSThread.mainThread().threadDictionary(),
    debugMode = false

sketch-module-google-analytics

A sketch module to help tracking events with Google Analytics

MIT
Latest version published 4 years ago

Package Health Score

49 / 100
Full package analysis

Popular sketch-module-google-analytics functions