0 Value is not being passed to the Adobe Analytics - DTM | Community
Skip to main content
Roshanchauhan
Level 3
June 26, 2018
Solved

0 Value is not being passed to the Adobe Analytics - DTM

  • June 26, 2018
  • 1 reply
  • 1378 views

Hi,

I have created following function to send values 0 and 1 when users give a kudo value=1 and for un-kudo value=0.

I am facing issue with un-kudo because it's not sending 0 value to the adobe, if we replace 0 with any numeric values like 2 it works. But I wanted to assign a 0 value for the un-kudo. How can we do this through DTM?

function bindKudoEvent(){

jQuery('.lia-button-image-kudos-kudoed .kudos-link').on('click',function(e){

console.log("KUDO REMOVE");

var isAcceptedSol = $(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

console.log("Parent Solution CHECK", isAcceptedSol);

trackClickTkb(0,"kudo count",isAcceptedSol)

setTimeout(function(){ bindKudoEvent() }, 3500);

});

jQuery('.lia-button-image-kudos-not-kudoed .kudos-link').on('click',function(e){

console.log("kudo Given KUDO")

var isAcceptedSol = $(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

console.log("Parent Solution CHECK", isAcceptedSol);

trackClickTkb(1,"kudo count")

setTimeout(function(){ bindKudoEvent() }, 3500);

});

}

Thanks in Advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Stewart_Schilling

My assumption is that something is evaluating your values as truthy or not truthy.  1 is Truthy and 0 is not. 

One option would be to try passing them as strings "0" and "1".  The other would be to use "F", "T" as indicators or "N", "Y".

My other observation is that this code replicates much of what DTM and Launch do out of the box. Why not just create a DTM event based rule (or two)?

1 reply

Stewart_Schilling
Community Advisor
Stewart_SchillingCommunity AdvisorAccepted solution
Community Advisor
July 18, 2018

My assumption is that something is evaluating your values as truthy or not truthy.  1 is Truthy and 0 is not. 

One option would be to try passing them as strings "0" and "1".  The other would be to use "F", "T" as indicators or "N", "Y".

My other observation is that this code replicates much of what DTM and Launch do out of the box. Why not just create a DTM event based rule (or two)?