Created
September 11, 2014 22:24
-
-
Save paulmkoch/7b79d9d6420a563c48d7 to your computer and use it in GitHub Desktop.
Event Label from Data Attribute
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
// This macro looks for data attributes whose values are separated by a pipe ('|'). Replace the pipe with the separator your data attribute uses, such as a comma. | |
function() { | |
tracking = {{Get Values from Data Attribute}}; | |
tracking = tracking.split('|'); | |
return tracking[2]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment