1
votes

UPDATE: I've disabled the enhanced ecommerce from the tag configuration. The problem I see is that my datalayer is correctly created, all the rules fire, in GA I can see the event Purchase but I don't see the information related to the order value and products ordered. Am I missing something that should map my custom variables to the GA ones?

Hi all, our GA + GTM worked fine since the end of May due to a problem with the google tag manager account we've lost all the configuration in the GTM. Now I'm trying to reconfigure it considering that 1) This is my really first experience with these tools 2) I don't have documentation on how the GTM was configured.

What I'm doing is to reverse engineering the GTM configuration starting from what I can see in the HTML and in the Google Analytics reports.

One of the reports that stopped working is the one related to E-commerce.

From the HTML I see the following instruction:

dataLayer.push({
"event":"Purchase",
"customerEmail":"[email protected]",
"orderNumber":"OIT00019938",
"orderRevenue":"31,97",
"orderShippingValue":"4,92",
"orderDiscountValue":"0,00",
"orderShippingCountry":"IT",
"orderShippingZip":"20141",
"orderInvoiceCountry":"IT",
"orderInvoiceZip":"20141",
"orderPaymentMethod":"cash_on_delivery",
"orderShippingMethod":"standard",
"orderCouponLabel":"",
"orderAffiliate":"(not set)",
"items":
[{"sku":"00080988",
"fullSku":"00080988-IT_48-ffffff",
"orderNumber":"OIT00019938",
"itemBrand":"C'N'C COSTUME NATIONAL Long-sleeve-shirts",
"itemMacro":"camicie",
"itemMicro":"camicie maniche lunghe",
"itemGender":"man",
"itemSeason":"spring-summer",
"itemSize":"IT_48",
"itemColor":"bianco",
"itemPrice":"31,97","itemQuantity":"1"}]});

I've tried to configure the GTM with differente ways but none of them worked. I have a rule that fires whenever an event "Purchase" happens (and I see that it really fires with the GTM debug view) and I've created different tags playing with type (event, page view), enabling Enable Enhanced Ecommerce Features and DataLayer etc. Unfortunately it never worked so far. Since I'm using a lot of custom variables in the datalayer I think that somewhere in the GTM I should map them with the ones used by Google Analytics, but, if true, I don't know where...

Since everything worked fine until the end of May and that the only thing that changed is the suddenly disappear of GTM, I assume that configuring in the right way the GTM everything should start work again.

Any idea? Alexio

3
It sounds like somebody enabled the Enhanced Ecommerce feature on your transaction tag. Enhanced Ecommerce uses a different library than the dataLayer you have implemented. Without seeing the site and walking through the entire funnel, it's tricky to debug. I would try disabling the enhanced ecommerce option on the transaction tag.Blexy
I'm trying to configure the GTM from scratch and I've tried with and without the Enhanced Ecommerce fetaure but without effectAlexio Cassani

3 Answers

1
votes

You either need to use the defined GA naming convention in you dataLayer object then GTM will pass these automatically to a GA tag (Universal GA) or you need to trigger a JS tag that will push the values into the dataLayer in the correct format. You can get the values using dataLayer macros and use them in your JS.

Once done, you can push an event into the dataLayer and use that as a rule to file the GA tag once the values are all there.

https://support.google.com/tagmanager/answer/3002596?hl=en

0
votes

If you are going to use the enhanced ecommerce features in Google Analytics you need to add the ec.js library. It should be placed before the GTM container. Also, in your Google Analytics property a view for Enhanced Ecommerce needs to be created. My advice, if you are learning from scratch go with enhanced ecommerce enabled. More difficult to implement but provides a lot more data gathering options.

0
votes

Here is the Enhanced E-commerce data layer for purchase event -:

<script type="text/javascript">
//<![CDATA[
    window.dataLayer = window.dataLayer || [];
        dataLayer.push({
      'ecommerce': {
        'purchase': {
          'actionField': {
            'id': '100000191',                         // Transaction ID. Required for purchases and refunds.
            'affiliation': '',
            'revenue': '199.9900',                     // Total transaction value (incl. tax and shipping)
            'tax': '15.2400',
            'shipping': '0.0000',
            'coupon': ''
          },
          'products': [
                                                  {                            
            'name': 'AT&T 8525 PDA',     // Name or ID is required.
            'id': '8525PDA',
            'price': '184.7500',
            'brand': 'At&t',
            'category': 'Cell Phones',
            'quantity': 1.0000          }]
                                }
      }
    });
//]]>
</script>