Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<script> // Send transaction data with a pageview if available // when the page loads...
Decoded Output download
<?
<script>
// Send transaction data with a pageview if available
// when the page loads. Otherwise, use an event when the transaction
// data becomes available.
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '{$trans['id']}', // Transaction ID. Required for purchases and refunds.
'affiliation': '{$trans['affiliation']}',
'revenue': '{$trans['revenue']}', // Total transaction value (incl. tax and shipping)
'tax':'{$trans['tax']}',
'shipping': '{$trans['shipping']}',
},
'products': [{ // List of productFieldObjects.
'name': '{$item['name']}', // Name or ID is required.
'id': '{$trans['id']}',
'price': '{$item['price']}',
'category': '{$item['category']}',
'sku': '{$item['sku']}',
'quantity': '{$item['quantity']}',
},
}
}
});
</script>
?>
Did this file decode correctly?
Original Code
<script>
// Send transaction data with a pageview if available
// when the page loads. Otherwise, use an event when the transaction
// data becomes available.
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '{$trans['id']}', // Transaction ID. Required for purchases and refunds.
'affiliation': '{$trans['affiliation']}',
'revenue': '{$trans['revenue']}', // Total transaction value (incl. tax and shipping)
'tax':'{$trans['tax']}',
'shipping': '{$trans['shipping']}',
},
'products': [{ // List of productFieldObjects.
'name': '{$item['name']}', // Name or ID is required.
'id': '{$trans['id']}',
'price': '{$item['price']}',
'category': '{$item['category']}',
'sku': '{$item['sku']}',
'quantity': '{$item['quantity']}',
},
}
}
});
</script>
Function Calls
| None |
Stats
| MD5 | 01c0ca922904fad1ed80b2647472d2ca |
| Eval Count | 0 |
| Decode Time | 87 ms |