SHARE
TWEET

Untitled

a guest Mar 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function yourFunctionForButtonClick() {
  2.  
  3.   //Your code to get pid/count value, put into a javascript array.
  4.  
  5.   //new code to provide data to GTM
  6.   dataLayer.push({
  7.     event: 'newPidProvided',
  8.     pidcountvalue: pid + ',' + count
  9.   });
  10.  
  11.   //Your code to reset pid with '', reset count with 1'.
  12.  
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top