Created
September 25, 2015 19:05
-
-
Save srhyne/e41c6ac8d6360311999d to your computer and use it in GitHub Desktop.
track events on anchor links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('a[data-affiliate]').click(function(e){ | |
| var _this = $(this); | |
| e.preventDefault(); | |
| var aff = _this.data('affiliate'); | |
| Conveyour.track('chose_affiliate', { | |
| affiliate : aff | |
| }); | |
| window.open(_this.attr('href'), "_blank"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment