Sometimes you will find that the transaction ID and or the Totals are not in an ID but are inside of a Class.  Here is an example using javascript of getting the data from these tags.


Page HTML

 

<div class="orderinfo"><span class="left">Order Number:</span><span class="right">BH9109705</span></div>
<li class="order-total">
			
			<span class="label">Total</span>
			<span class="value">£250.00</span>
		</li>

<p id="demo"></p>

    

Javascript


<script type="text/javascript">
//Get Order Value
var valueElement = document.getElementsByClassName('value'),
    value = valueElement[0].innerHTML.replace("£", "");

//Get Transaction ID
var transactionIdElement = document.getElementsByClassName('orderinfo')[0],
    transactionId = transactionIdElement.getElementsByClassName("right")[0].innerHTML;

OPPixelInfo = {
    hash: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    type: "purchase",
    transaction_id: "transactionId",
    transaction_value: "value"
};
var e = document.createElement("script");
e.src = "https://offerpop.com/js/pixel.js";
e.async = true;
document.body.appendChild(e);
</script>