title: Why my Google Analytics ecommerce transfer doesnt get registered?
body: <p>I have ecommerce configured on my analytics page (very basically), and I'm trying to send a transaction based on <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce" rel="nofollow noreferrer">this</a>.</p>
  
  <p>The code being rendered on my browser when the transaction is done, looks like this:</p>
  
  <p>Head: (Jade)</p>
  
  <pre><code>script(async='', src='https://www.googletagmanager.com/gtag/js?id=UA-XXXX-1')
  script.
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments)};
    gtag('js', new Date());
    gtag('config', 'UA-XXXX-1');
  </code></pre>
  
  <p>Body, further down</p>
  
  <pre class="lang-js prettyprint-override"><code>var order = {
    "_id":"59e3cf363095221100edb909",
    "frete":{"frete":1350},
    "payment":{
      "Payment":{
        "Amount":5550
      }
    },
    "products":[
      {"product":{
        "_id":"58eb9dfb147a3b1a000e0d9c",
        "price":4200,
        "category":"58988fd4b2ae511a00eff884",
        "name":"CAIXA DE TRUFAS"
      },
      "quantity":1
      }]
    };
  
  var itens = [];
  
  var product
  var item;
  for(var i  = 0; i &lt; order.products.length; i ++){
    product = order.products[i].product
    item = {
      "id": product['_id'],
      "name": product.name,
      "category": product.category.name,
      "quantity": order.products[i].quantity,
      "price": product.price / 100
    }
    itens.push(item);
  }
  
  gtag('event', 'purchase', {
    "transaction_id": order['_id'],
    "affiliation": "Frutacor",
    "value": order.payment.Payment.Amount / 100,
    "currency": "BRL",
    "shipping": order.frete.frete / 100,
    "items": itens
  });
  </code></pre>
  
  <p>The thing is, nothing shows up on my Analytics page and I don't know why. Researching about it, I've encountered things about analytics, ga, Google Tag Manager (GTM), and the new gtag.js, which is the one I'm using</p>