Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb1cd34

Browse files
patmellonsoumith
authored andcommitted
Update download tracking (#454)
1 parent 9e6c8ba commit eb1cd34

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

_templates/layout.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@
3838
fbq('init', '243028289693773');
3939
fbq('track', 'PageView');
4040

41-
$("a.reference.download").on('click', function(){
41+
$("[data-behavior='call-to-action-event']").on('click', function(){
4242
fbq('trackCustom', "Download", {
4343
tutorialTitle: $('h1:first').text(),
4444
downloadLink: this.href,
4545
tutorialLink: window.location.href,
46-
downloadTitle: this.innerText
46+
downloadTitle: $(this).attr("data-response")
4747
});
4848
ga('send', {
4949
hitType: 'event',
5050
eventCategory: 'Download',
5151
eventAction: 'click',
52-
eventLabel: this.innerText
52+
eventLabel: $(this).attr("data-response")
5353
});
5454
});
5555

0 commit comments

Comments
 (0)