Hi, I am trying to filter those link which I don’t want to track by using filter function but it’s track all the link without filtering. I also trying to log that function is calling or not but found that it’s not call this function. Please find below the code snippet.
//MY CUSTOM FILTER FOR FILTERING SPECIFIC URL
function myCustomFilter(linkElement) {
console.log(linkElement);
return linkElement.href !== 'google';
}
//ENABLE LINK CLICK FOR SPECIFIC URLs
snowplow('enableLinkClickTracking', {
options: { filter: myCustomFilter }
});
@PawanK , as I can see you are using the older version of the tracker, v2.12. The usage of enableLinkClickTracking is different for that version. Please, refer to Tracking Events | Snowplow Documentation for guidance instead.
In particular, your tracking code would look like below: