Created
December 7, 2020 18:21
-
-
Save davivc/4c23a8d0cf99d0e4d42613deae014526 to your computer and use it in GitHub Desktop.
Ceris Theme dataLayer on Reactions script
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
var reactionName = ''; | |
if($(this).find('.atbs-reaction-name')){ | |
reactionName = $(this).find('.atbs-reaction-name').text(); | |
} | |
window.dataLayer = window.dataLayer || []; | |
window.dataLayer.push({ | |
'event': 'reaction', | |
'dtL.reaction': { | |
'type': reactionType, | |
'status': reactionStatus, | |
'name': reactionName | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment