Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Event Label 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[2];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment