Skip to content

Instantly share code, notes, and snippets.

View arturodz's full-sized avatar

Arturo Diaz arturodz

View GitHub Profile
EM.run {
ws = Faye::WebSocket::Client.new('wss://ws.localhost.com')
ws.on :open do |event|
puts [:open]
ws.send("Alo!")
end
ws.on :error do| event|
puts "Error: #{event.data}"
end
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
‘event’ : ‘transactionComplete’,
‘transactionId’: ‘{{order.order_number}}’,
‘transactionTotal’: {{total_price | times: 0.01}},
‘transactionTax’: {{tax_price | times: 0.01}},
‘transactionShipping’: {{shipping_price | times: 0.01}},
‘transactionProducts’: [
{% for line_item in line_items %}