Skip to content

Instantly share code, notes, and snippets.

@paulmkoch
Created September 11, 2014 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulmkoch/63a631e95882b003ef5c to your computer and use it in GitHub Desktop.
Save paulmkoch/63a631e95882b003ef5c to your computer and use it in GitHub Desktop.
Event Action from Data Attribute
// 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[1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment