appengine/analytics/app.rb [29:47]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def track_event category, action, label, value
  # Anonymous Client ID.
  # Ideally, this should be a UUID that is associated
  # with particular user, device, or browser instance.
  client_id = "555"

  Net::HTTP.post_form(
    URI("http://www.google-analytics.com/collect"),
    v:   "1",             # API Version
    tid: GA_TRACKING_ID,  # Tracking ID / Property ID
    cid: client_id,       # Client ID
    t:   "event",         # Event hit type
    ec:  category,        # Event category
    ea:  action,          # Event action
    el:  label,           # Event label
    ev:  value            # Event value
  )
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



appengine/standard-analytics/app.rb [22:40]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def track_event category, action, label, value
  # Anonymous Client ID.
  # Ideally, this should be a UUID that is associated
  # with particular user, device, or browser instance.
  client_id = "555"

  Net::HTTP.post_form(
    URI("http://www.google-analytics.com/collect"),
    v:   "1",             # API Version
    tid: GA_TRACKING_ID,  # Tracking ID / Property ID
    cid: client_id,       # Client ID
    t:   "event",         # Event hit type
    ec:  category,        # Event category
    ea:  action,          # Event action
    el:  label,           # Event label
    ev:  value            # Event value
  )
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



appengine/flexible/analytics/app.rb [22:40]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def track_event category, action, label, value
  # Anonymous Client ID.
  # Ideally, this should be a UUID that is associated
  # with particular user, device, or browser instance.
  client_id = "555"

  Net::HTTP.post_form(
    URI("http://www.google-analytics.com/collect"),
    v:   "1",             # API Version
    tid: GA_TRACKING_ID,  # Tracking ID / Property ID
    cid: client_id,       # Client ID
    t:   "event",         # Event hit type
    ec:  category,        # Event category
    ea:  action,          # Event action
    el:  label,           # Event label
    ev:  value            # Event value
  )
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



appengine/flexible/ruby31-and-earlier/analytics/app.rb [22:40]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def track_event category, action, label, value
  # Anonymous Client ID.
  # Ideally, this should be a UUID that is associated
  # with particular user, device, or browser instance.
  client_id = "555"

  Net::HTTP.post_form(
    URI("http://www.google-analytics.com/collect"),
    v:   "1",             # API Version
    tid: GA_TRACKING_ID,  # Tracking ID / Property ID
    cid: client_id,       # Client ID
    t:   "event",         # Event hit type
    ec:  category,        # Event category
    ea:  action,          # Event action
    el:  label,           # Event label
    ev:  value            # Event value
  )
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



