Created
January 26, 2016 18:51
-
-
Save sperand-io/79cb9ffcde6b58ead596 to your computer and use it in GitHub Desktop.
Track Link Dynamic Properties Example
This file contains 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
// links are DOM element(s) (multiple or singular) | |
// | |
// var links = document.querySelectorAll('a'); | |
// var links = document.getElementByTagName('#specificLink') | |
analytics.trackLink(links, 'Clicked Link', function(link) { | |
return { | |
url: link.href, | |
copy: link.innerText | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment