Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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': 'T12345', // Dinamico - Transaction ID. Required for purchases and refunds.
- 'affiliation': 'Madridistas', // Estático
- 'revenue': '35.00', // Dinamico - Total transaction value (incl. tax and shipping)
- 'coupon': 'Amazon' // Dinamico - Forma de pago tarjeta, transferencia, paypal, amazon...
- },
- 'products': [{ // List of productFieldObjects.
- 'name': 'Madridista nacional senior', // Dinamico - Nombre de producto.
- 'id': '12345', // Dinamico - Id de producto
- 'price': '35.00', // Dinamico - Precio
- 'brand': 'Real Madrid', // Estático es la linea de negocio
- 'category': 'Carnet Madridista',
- 'variant': 'Nacional', // Dinamico Nacional o Internacional
- 'quantity': 1,
- }]
- }
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement