Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script>
var dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'transaction',
'ecommerce': {
'purchase': {
'actionField': {
'id': '{תוכן דינמי}', // Transaction ID. Required for purchases and refunds.
'revenue': '{תוכן דינמי}', // Total transaction value (incl. tax and shipping)
'tax': '{תוכן דינמי}',
'shipping': '{תוכן דינמי}',
'coupon': '{תוכן דינמי}'
},
'products': [{ // List of productFieldObjects.
'name': '{תוכן דינמי}', // Name or ID is required.
'id': '{תוכן דינמי}',
'price': '{תוכן דינמי}',
'category': '{תוכן דינמי}',
'variant': '',
'quantity': '{תוכן דינמי}',
'coupon': '{תוכן דינמי}' // Optional fields may be omitted or set to empty string.
},
{
'name': '{תוכן דינמי}',
'id': '{תוכן דינמי}',
'price': '{תוכן דינמי}',
'category': '{תוכן דינמי}',
'variant': '',
'quantity': {תוכן דינמי} }]
}
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment