Revenue Tracking in SimpleGive Platform

Table of Contents

Facebook
Twitter
LinkedIn
Pinterest
Email
Print

How Can We Help?

Donation amount

function(){

var amount = extractMoney(document.getElementsByClassName('text-left')[0].innerText);          console.log(amount['amount']);
  return amount['amount']; 
}

Trigger

Use Element Visibility and look for class name – .thankyou-icon

Special Note

Must add this to every page where amount is needed

  var extractMoney = function(string) {
    var amount = string.match(/[0-9]+([,.][0-9]+)?/)
    var unit = string.replace(/[0-9]+([,.][0-9]+)?/, "")
    if (amount && unit) {
      return {
        amount: +amount[0].replace(",", "."),
        currency: unit
      }
    }
    return null;
  }
More to explorer
Wishing You the Joys of the Season!

Once upon a time, in a bustling world filled with shared dreams and aspirations, there existed a group of remarkable individuals who