Ecommerce Tracking for Google Analytics Not Working

Highlighted
Shopify Partner
3 0 0

We're currently in a staging environment and I've added Google Analytics and Google Tag manager following the Shopify instructions here:

https://help.shopify.com/manual/reports-and-analytics/google-analytics/google-analytics-setup#enable...

https://help.shopify.com/manual/reports-and-analytics/google-analytics/google-tag-manager#verify-tha...

As I'm testing our tracking setup, I can see that Google Analytic pageview is firing and the test events I've setup through Tag Manager are also firing. However, even though I've enabled Ecommerce tracking through our Google Analytic account, there are no details in our Ecommerce reports in Google Analytics. I did my first test several days ago and still see no details. I use Fiddler to help debug tag setup and when I go through the checkout process, I also don't see any pageviews being fired.

When reviewing the page source, I can see the Google Tag manager code that was added to following the instructions from Shopify, but I don't see the snippit showing that Enhanced Ecommerce is integrated properly.

We do have a payment processor Authorize.net and I've excluded both the processor and checkout.shopify.com from our referral list to ensure that's not causing any issues.

Are there any other suggestions out there that I should try to resolve the issue?

0 Likes
Highlighted

Hi there,

I need to see your online store to see how the code is installed. To debug the possible issue Google Tag Assistant Chrome browser is enough. Make sure that you installed 02 parts of GTM code in the HEAD and BODY tags.

You can see how I integrated the GTM code on my site https://www.sellersmith.com/

Right click of mouse then View Source code.

❤️ Found my answer helpful? Please LIKE or Accept Solutions.
❤️Shopify Calculator - What's the Cost of a Shopify Store? Read More
0 Likes
Highlighted
Shopify Partner
3 0 0

Thank you for providing the link to your website. As far as I can tell, GTM and GA are setup the same as your website when I click to view source code, until I get to the Checkout steps. Once on the checkout steps the only code that I can see is GTM and the GA Enhanced Ecommerce hook is no longer there which I think is causing the issue.

We are on staging, but here is a link to a product page that should be working: https://staging-gkelite.pollinate.com/products/l1048

0 Likes
Highlighted

Kathryn,

Try to use Google Tag Assistant to debug the issue. Also make sure that you enabled Enhanced Ecommerce as Shopify suggested via the guide https://help.shopify.com/manual/reports-and-analytics/google-analytics/google-analytics-setup#turn-o...

The video with guidance steo by step https://www.youtube.com/watch?v=nK0kHXUJPxs If this doesn't work there is the only way to contact directly to Shopify gurus I guess... 

❤️ Found my answer helpful? Please LIKE or Accept Solutions.
❤️Shopify Calculator - What's the Cost of a Shopify Store? Read More
0 Likes
Highlighted
Shopify Partner
51 0 12

Hi Kathryn,

Has this been fixed?

If you're ONLY firing GA tracking code through GTM, there'll be no Enhanced E-Commerce events fired on your property.

I've written a step by step guide on how to setup GA Enhanced E-Commerce properly on Shopify.

http://siavak.com/google-analytics-enhanced-ecommerce-shopify/

Check if you've followed the steps outlined in the guide, and if you still need further assistance, please feel free to get in touch and I'll be happy to take a look at your setup for free, it might just be missing a simple config.

- Ahmad

Certified E-Commerce Optimisation and Analytics Expert
0 Likes
Highlighted
Shopify Partner
71 0 12

Hey Ahmad,

Thanks for writing this guide! It puts a lot of insights for me. Do you have any guides with setting up Google Adwords & Shopify goals? I'm running the promotion campaign right now and collecting leads emails, but stuck on configuration the "goal" between Mailchimp sign up and GA Goal.

Facebook Ads, Google Adwords & Google Analytics - my passion and that's what I can help you with right now.
0 Likes
Highlighted
Shopify Partner
51 0 12

Hello Nathan,

So you basically want to have a goal in GA for every MailChimp sign up, right?

To count each MC sign up as a goal in GA, you have to ways:

1. [easy] If there's a thank you page that people are redirected to after a successful signup, you can simply setup a destination goal in GA:

In GA, go to Admin > View > Goals, create a new goal and chose either "Newsletter Sign Up" or "Custom", then chose "Destination" and then write the URL of your Thank you page. You can optionally put a $ value amount for each subscription, if you're not sure how much, just put $1 in there.

2. If there's no Thank You page. i.e. If you show an AJAX message or it's in a pop-up, then you need to fire an event every time the submit button is pressed (which is not 100% accurate because it doesn't take form validation errors into account, i.e. if the email field is empty and someone clicks on the button, it'll be counted as a goal). But it gives you a good idea of your lead gen campaign performance. This can be achieved through Google Tag Manager or a custom piece of code.

Hope this helps, 

- Ahmad 

Certified E-Commerce Optimisation and Analytics Expert
0 Likes
Highlighted
Shopify Partner
3 0 0

Thank you all for your feedback! Since there are tags we want to use with Google Tag Manager, the standard GA integration on Shopify seemed to be conflicting when using GTM. I was actually able to add Google Tag Manager Enhanced Ecommerce tracking successfully by following this blog post:

http://www.endreywalder.com/blog/shopify-not-plus-google-tag-manager-checkout-page-data-layer/

One difference is that we do have access to the liquid.checkout file since we have Shopify Plus. In that case we added the code snippet to the checkout.liquid file. In order for the snippet to work correctly, we also had to reference the checkout object. Below is an example of the modification to the code for the Data Layer push.

'ecommerce' : {
          'purchase': {
            'actionField': {
              'id': {{checkout.order_number | json}},
              'revenue': {{checkout.subtotal_price | times: 0.01 | json}},
              'tax': {{checkout.tax_price | times: 0.01 | json}},
              'shipping': {{checkout.shipping_price | times: 0.01 | json}},
              'customerType': custType,
              'lifetimeOrders': lftOrders,
              'coupon': {{lcoupons | json}},
            },

If you want more information on the Checkout object, Shopify documentation can be found here: https://help.shopify.com/themes/liquid/objects/checkout

0 Likes
Highlighted
New Member
8 0 0

Hey Kathryn,

I'm working on implementing GTM on Shopify Plus and had a few questions for you.

I've followed the steps outlined in your last post and set up cross domain tracking since we're testing a new site across two domains.

I can open up the debug window in the shopify checkout pages but I can't see any data layer message firing on them even though I can see the data layer scripts  when I view source (see attached pic).

We've set up both the checkout script and the purchase script but I'm only seeing the purchase script on the very last page (the thank you page) presumably because of Shopify's first_time_accessed property... 

https://help.shopify.com/manual/orders/status-tracking/first-time-accessed

What am I missing here? 

0 Likes