Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Small fix on anonymous sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Jul 28, 2017
1 parent b539b61 commit 14e6c58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions coffee/profit-well.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ template = """
(function(i,s,o,g,r,a,m){i['ProfitWellObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m); })(window,document,'script','https://dna8twue3dlxq.cloudfront.net/js/profitwell.js','profitwell');
profitwell('auth_token', '<%= token %>');
profitwell('user_email', '<%= user.email %>');
profitwell('user_email', '<%= email %>');
</script>
"""

ProfitWellDirective = ($compile, $auth, $config) ->
link = ($scope, $el, $attrs) ->
context = {
token: $config.get("profitWellToken"),
user: $auth.getUser()
email: $auth.getUser()?.email
}

profitWellScript = _.template(template)(context)

$el.append(profitWellScript)

return {
Expand Down
2 changes: 1 addition & 1 deletion dist/profit-well.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 14e6c58

Please sign in to comment.