Skip to content

Instantly share code, notes, and snippets.

@markhallen
Created October 15, 2018 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markhallen/130c4cc17e69f046421f46a3c15e21f3 to your computer and use it in GitHub Desktop.
Save markhallen/130c4cc17e69f046421f46a3c15e21f3 to your computer and use it in GitHub Desktop.
Use data-log in tags for amplitude.com events
$(document).on 'turbolinks:load', ->
$("a[data-log]").click (event) ->
logEvent = $(this).data("log")
amplitude.getInstance().logEvent(logEvent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment