Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/assets/javascripts/client/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class @Abba
@useVariant(variant)
this

complete: (name) =>
complete: (name, callback) =>
# Optionally pass a name, or read from the cookie
name or= @getVariantCookie()
return this unless name
Expand All @@ -144,7 +144,7 @@ class @Abba
else
@reset()

@recordComplete(name)
@recordComplete(name, callback)
this

reset: =>
Expand Down Expand Up @@ -174,9 +174,9 @@ class @Abba
# Set the variant we chose as a cookie
@setVariantCookie(variant.name)

recordComplete: (name) =>
recordComplete: (name, callback) =>
# Record the experiment was completed on the server
request("#{@endpoint}/complete", experiment: @name, variant: name)
request("#{@endpoint}/complete", experiment: @name, variant: name, callback)

# Variant Cookie

Expand Down