Category : Google Tag Manager
How to track ecommerce conversions in GA4 (Google Analytics 4)
Have you mapped out a data plan for 2023 yet? If you’re selling on a major DTC platform like Shopify or BigCommerce, GA4 is probably on your mind. With the sunsetting of Universal Analytics (GA3 or the “old version” of Google Analytics) on the horizon, it’s time to get going with event-based tracking. Many brands have been procrastinating about setting up GA4 – or, worse, only setting it up halfway so that browsing behavior is tracked but revenue and conversions are missing. But can you blame them? Shopify isn’t planning to release native GA4 integration until March 2023 at the earliest (and nobody’s expecting it to work well for serious DTC brands) BigCommerce released a beta version of their GA4 integration in November, but it’s extremely minimal, tracking only begin_checkout and purchase events Manual setup is costly and confusing (and has to be maintained every time you change your site or checkout flow) GA4 revenue tracking should be your top priority, but there’s a lot of confusion around GA4, made worse by Shopify apps that claim to offer GA4 integration but only offer client-side tracking. It shouldn’t be so complicated. At Littledata we’ve already fixed GA4 tracking for hundreds of top DTC brands. In this post I’ll show you how to check if you’ve set up GA4 correctly to capture orders and revenue, and how to start tracking ecommerce conversions today in the most secure and reliable way possible. Follow this guide to GA4 and you’ll be on your way to ecommerce data tracking in no time. We’ll look at how to get from this: To this: How to check if you’re tracking GA4 revenue and conversions After creating a new GA4 property and following the setup assistant to create a new data stream, you might have noticed that you’re instructed to copy and paste the Google tag (gtag.js) script on every page of your ecommerce site. Once you’ve added the Google tag to your site and linked your GA4 property, everything will just start tracking automatically, right? Wrong. With the basic script all you get are engagement events such as page_view, session_start, view_search_result, and click. Obviously these “automatic events” are super important, but they don’t tell you what happens post-click. Here’s how to check if your GA4 ecommerce setup is working or not. 1. Check your Acquisition reporting in GA4 There are two places to look to see if you’re capturing ecommerce conversions. First, the Acquisition reports. You’ll see user and traffic engagement details grouped by channel, but no conversion or revenue data exists. You’re seeing which organic or paid channels are bringing visitors to your store, but you can’t tell if you’re generating any revenue from these visitors. GA4 revenue reporting not showing is one of the most asked questions by merchants and performance marketers. 2. Check your Engagement and Monetization reporting in GA4Taking a step further, check your Engagement and Monetization reports. Do you see GA4 reporting data about cart updates, interactions with the checkout flow, or any purchase or revenue data? If revenue is missing in GA4’s monetization overview, you need to start tracking ecommerce activity ASAP. Otherwise, you’ll end up with a lot of data points that lead nowhere and you will not have an accurate understanding of your ecommerce store’s performance. [tip] Use our complementary instant order checker for GA4 to check your property [/tip] How to track ecommerce conversions and revenue in GA4 After landing on your store, online shoppers interact with collections and products before adding items to their carts and going through the checkout process. These web interactions must be captured as events and linked with customers and marketing data in GA4 to get a complete picture of your business. We have looked at what data can be missing from your GA4 events and which enhanced ecommerce events you should track. But how can you get all these ecommerce events in GA4? Google Tag Manager (GTM) has always been the most common tracking method for Universal Analytics, and the setup process can be carried over to GA4. However, for a lean team, the setup process can be quite time-consuming and complex, having to create a Data Layer In Shopify, and then for each event, you must create: Firing Triggers in GTM Data Layer Variables in GTM Ecommerce Tags in GTM Needless to say, there are quite a few maintenance pitfalls if you're going down this route. Setup is just the beginning. To make matters worse, Shopify is removing GTM from the checkout for Shopify Plus stores (standard Shopify stores never had access). So even if you take the time to add all your own events to tracking visitors before they make a purchase, you’ll no longer be able to track checkout steps (add-to-cart, etc) with GTM. If you want to save time and money while still having confidence in the accuracy of your GA4 data, Littledata is the perfect solution for you. Our proven app is used by over 1500+ brands and can help you track your ecommerce conversions with ease, giving you the reliable data you need to make informed decisions about your business. Littledata’s data layer uses a unique combination of client-side and server-side tracking to ensure accurate, complete ecommerce data in GA4 and any connected data warehouse or reporting destination. Littledata captures complete ecommerce data automatically in GA4 for Shopify and BigCommerce stores. We can break down those events into seven general categories: Marketing channels Browsing behavior Checkout steps Conversions Revenue Recurring orders Upsells Of course, each reporting category has useful data, but brands that really want to scale link it all together to look at revenue and LTV by channel, splitting out first-time purchases from repeat purchases or recurring orders (subscription analytics). As I mentioned earlier, Acquisition reports are some of the most valuable sets of data GA4 offers. They show which of your team’s marketing efforts bring the most results, from traffic through engagement and conversions. The difference between having accurate or questionable ROI data in these reports rests on how the purchase event is tracked. It is useful to have the engagement metrics grouped by channel, but the difference between having accurate or questionable ROI data in these reports rests on how the purchase event is tracked. Get started with Littledata today so you will have the data you need to scale faster the smart way. We recommend tracking in UA and GA4 “in parallel” as soon as possible.
Is Shopify cutting off GTM support?
There have been rumors circulating about the latest version of Shopify checkout not supporting Google Tag Manager (GTM). Is Shopify cutting off support for GTM on the checkout completely? This might be the biggest announcement from Shopify this year, but also the most overlooked. We have been working with Shopify tracking since the beginning at Littledata and have followed these updates closely. So let me unpack what is and is not changing for GTM tracking on Shopify and Shopify Plus. What is Google Tag Manager? Many Shopify stores use Google Tag Manager (GTM) to deploy marketing ‘tags’ across their web pages, without the need to directly edit the store theme.The free tool developed by Google has shot to popularity ahead of paid rivals such as Tealium. GTM makes it easy for these stores to track pageviews and on-site events in Google Analytics, Facebook Ads and other analytics and marketing platforms, but capturing checkout steps and transactions (orders) is more difficult. Until recently, Shopify Plus stores had the ability to also add GTM to the checkout pages, by adding the GTM container to the theme checkout.liquid file. This allowed tracking of checkout steps to power, for example, abandoned checkout retargeting via email or Facebook Ads. Even though there are automated solutions that track checkout steps accurately and securely without the need for GTM, some merchants and agencies still tried to do this manually via GTM. When will GTM be blocked on the Shopify checkout? Starting last month (November 2022), and accelerating after peak trading season (holiday shopping) ends, Shopify will no longer be allowing Google Tag Manager in the checkout for Shopify Plus stores. Shopify has been rolling out a new version of its checkout to Plus stores which will remove the ability to add scripts via checkout.liquid. The checkout.liquid file will still be present but be ignored. Shopify will no longer be allowing Google Tag Manager in the checkout Stores will get the ability to modify aspects of the checkout experience from within Shopify admin, but not the ability to add GTM to the checkout. This is not a temporary measure; it’s a long term solution to increase security in the checkout. You can still track completed orders on the order status (thank you) page via the Checkout Order Status Script section, but this client-side tracking is increasingly unreliable. Why didn’t merchants get a headsup? To be fair to Shopify, they have flagged extra scripts on the checkout as a security risk for a few years. They have been trying to close the Additional Scripts loophole since 2020, and have added a browser console warning about third-party scripts being blocked on the checkout. Their long term solution is the Web Pixels API, to allow tracking of checkout pages without access to the checkout pages - but this solution isn’t quite ready, and doesn’t include key steps of the checkout journey. How to replace GTM on the Shopify checkout If you run GTM on a Shopify Plus checkout you need to find an alternative to tracking the checkout steps. And you need to do so ASAP. Although GTM may still be running in your store, it won’t be for much longer. You have only two options I’m aware of: Use Littledata’s end-to-end tracking, which tracks tracks Shopify checkout steps server-side and automatically sends those events to data destinations such as Google Analytics, Segment, Facebook Ads (via Conversions API). This has the added advantage of tracking pre-checkout events server-side, which improves both page performance and data accuracy. Use an app that integrates with Shopify’s Web Pixel API. Apps like Elevar have taken this route, even though Web Pixel is still quite limited. Neither solution will provide quite the same level of customization as Google Tag Manager, but then it comes without the risks either. Can your store really take the risk of interrupting the checkout journey for the sake of some minor marketing optimization? Littledata tracks Shopify checkout steps server-side, without the need for GTM Why is Shopify restricting usage of GTM? GTM is loved by marketers for its ability to bypass developer blockers to get marketing tags live, but it is hated in equal measure by web security experts for the same ability to bypass security. With great deployment power should come great responsibility, but GTM allows a non-technical user to inject unknown JavaScript into all web pages on a site with minimal scrutiny. On pre-checkout pages of a store the worst impact is container bloat - multiple tracking tags from different vendors slow down the user experience for customers. The antidote to bloated GTM containers is to push most of the tracking server-side. Server-side tracking allows for faster page loads while improving data accuracy. But adding GTM to the checkout pages presents a much greater risk. As well as potentially interrupting a business-critical path to payment, rogue scripts loaded from GTM can scrape credit card details from the page and facilitate credit card fraud. The final straw for Shopify seems to have come in August when Shopify’s checkout was out of action globally for the best part of a day due to a conflict with GTM. I can’t believe more people aren’t talking about the @shopify checkout issue. 12 hours and massive stores are still affected with no announcement from shopifyHere’s a fix, if your store is affected pic.twitter.com/rkvr72AlBP— Matt Schroeder | 3PL Operator 📦 (@SchroedsBiz) August 31, 2022 With over $500M a day of GMV processed through Shopify checkout in Q3 alone, that is just too big an operational risk for Shopify to bear. Is GTM safe on the rest of my Shopify store? Yes, I can’t see why or how Shopify would restrict third-party scripts -- including GTM -- on the pre-checkout storefront. Shopify allows stores to add any functionality to the storefront as they want, even if that does make the pages load more slowly. That said, two advances in web tracking technology may make GTM redundant for your store: Enhanced Measurement in Google Analytics. This allows stores to track clicks, outbound links, video engagement and page scrolling without adding any code to the storefront. These were all events that required GTM to trigger previously. And it’s completely compatible with Littledata’s Google Analytics 4 connection. Server-side tracking across the customer journey. Browser-based tracking via GTM is increasingly unreliable as cookies and tracking scripts get blocked. Although Google Tag manager also supports server-side containers, the setup can be fiddly and requires you to run your own server infrastructure on Google Cloud. Littledata’s out-the-box server side solution provides all the benefits of server-side with none of the maintenance. So even if you’re quite happy with GTM - and not on Shopify Plus - I recommend you have a think about whether you really need GTM, or could find a lower maintenance solution. [subscribe]
How to track product page events using Littledata variables with Google Tag Manager
The product page is one of the most important places to capture data for any ecommerce store. It's a treasure trove of information on customer behavior, product performance, and, ultimately, conversions and revenue. But depending on your analytics setup, you might be sending data to different destinations—especially if you're using Google Tag Manager. The good news is Littledata is compatible with GTM, and actually improves the accuracy of your setup by using variables that give you deeper insight into the metrics you're collecting. In our newest courses episode, we'll show you how to track product page events using Littledata variables and your GTM setup to track more events and get more insight before you make critical decisions on your store. https://www.youtube.com/embed/3EN8BEG8o4s How to use Littledata Variables with GTM on the Product Page Setting up tracking in GTM for specific product page events is easy using Littledata's variables. All you need to do is set up an event trigger, make sure it's tracking the custom event you want, and label it. Once you have the trigger set up, you can connect it to a tag in your GTM setup and track it in your tags list. This allows you to track events like product name, brand, price, category, and so on. This whole process is expedited by using product variables from Littledata. These variables are stored in the templates section, and once you've selected the template you can search in the variables menu for the specific variable you want to track. From there, it's a simple copy and paste process to add the variable to the tag and start tracking. [tip]The world of analytics is changing—learn how to adapt to a world without third-party cookies in our latest white paper on first-party data.[/tip] Getting a more accurate picture of your store with Littledata and GTM Configuring a custom GTM setup can give you more hands-on control of your ecommerce store's analytics tracking than other solutions, but it also requires time to set up and maintain. If setup or maintenance isn't done properly, tags can break and you'll be left making decisions on incomplete or inaccurate data. Littledata's experts are happy to help you configure your own custom GTM setup, and using Littledata's variables takes some of the complications out of the equation by automating the process for you. If you want the ability to send data to many destinations while ensuring you're always seeing accurate data, then a custom GTM setup with Littledata's data layer could be just the right solution for you. Book a demo with our team to learn more or take advantage of the best deal in the ecommerce data game—30 days of Littledata's accurate tracking on your store absolutely free. [subscribe]
Does Littledata work with Google Tag Manager (GTM)?
Google Tag Manager (GTM) is a popular solution for adding marketing tags to your ecommerce website. But, it can be complex and time-consuming to set up — not to mention the cost and hassle of ongoing maintenance. Using Littledata’s direct analytics connectors helps you avoid this hassle by replacing GTM tags on your Shopify store. We also provide a GTM data layer for reuse with less common marketing tags. For many ecommerce stores, including larger Shopify Plus brands on Littledata Plus plans, Littledata eliminates the need for custom GTM setup by automatically tracking common marketing channels and ecommerce checkout flows. The same is true for DTC subscription brands, as Littledata's tracking automatically integrates with subscription apps in the Shopify checkout such as Recharge, Smartrr and Ordergroove. To show you how Littledata can replace Google Tag Manager for your store, let's look at the situations where it replaces GTM and what you get from the tool itself. When will you not need Google Tag Manager? As more DTC brands move to streamlined ecommerce platforms such as Shopify and BigCommerce, they are looking for automated tracking solutions instead of custom tracking plans. Littledata’s connections easily replace GTM tags for: Google AnalyticsGoogle Ads Thanks to our robust, server-side tracking, you no longer need to maintain tagging for these data destinations. You can also forget worries about breaking the data layer and tags or tagging system when you change store themes. Plus, Littledata’s Shopify source for Segment can relay data to hundreds of additional destinations, replacing GTM for many use cases. For example, our recent updates include support for a broader range of data destinations, such as email marketing tools and CRMs. When will you still need Google Tag Manager? Any further marketing tags (e.g. Pinterest, TikTok, Twitter) will still need to be set up in Google Tag Manager. If you are on a Littledata Plus plan, we can help set up those tags to ensure accurate tracking for these additional marketing channels. We're working on rolling out better support for Facebook's Conversions API soon. This is essentially a server-side Facebook Ads connection, so we're excited about the possibilities. In the meantime, we have an out-of-the-box Facebook Pixel connector in the Pixel Perfect app. What Google Tag Manager triggers are available with Littledata? Littledata’s tracking script for Shopify stores adds lots of detailed events which you can use to build funnels or trigger other marketing tags in GTM. For this client-side tracking, we support all the standard ecommerce events except for add to cart (which is hard to track on the browser) and checkouts. Tip: From add-to-cart through the checkout, Littledata uses server-side tracking. Learn more about how this works for the Google Analytics and Segment destinations So for GTM triggers, Littledata does support: Product list viewedProduct list clickedProduct detail viewedThank you pageCustomer login We enable this additional event tracking because most marketing platforms need specific ecommerce data to enable retargeting ads, not just the page views. With Littledata, every time something triggers one of these events on your storefront, our script adds the associated product data to the GTM data layer like this: { "event": "view_item", "ecommerce": { "detail": { "products": [ { "id": "AD-01-white-5", "name": "ADIDAS | SUPERSTAR 80S", "price": "170.00", "brand": "ADIDAS", "category": "all", "variant": "5 / white", "list_name": "/products/adidas-superstar-80s", "handle": "adidas-superstar-80s", "shopify_product_id": "4169037742142", "shopify_variant_id": "30293803139134", "compare_at_price": "0.00", "image_url": "https://cdn.shopify.com/s/files/1/0197/3698/5662/products/44694ee386818f3276566210464cf341.jpg?v=1571736156", "list_position": 4 } ] } }, } This helps with both marketing analysis and retargeting, as you can drill down to product-level data. Advanced users can get even more specific with GTM variables. What Google Tag Manager variables are available with Littledata? Littledata’s tracking script fetches product and customer data from Shopify and makes it available in the GTM data layer events (or the window.dataLayer array). To take advantage of this data, you can use GTM variables. What is a GTM variable? Google defines GTM variables like this: A variable is a named placeholder for a value that will change, such as a product name, a price value, or a date. We make it easy to choose the right variable for your tag using our GTM variable template. Common variables such as product SKU, price, and category are available with all product events. You can view the full list of variables here. What's the best practice for using Google Tag Manager with Shopify? Google Tag Manager works by first building a single container of all the triggers, tags, and variables, then loading that container on every page. This makes it easy to maintain, but on the downside every extra tag you add to the container increases the first-time page load speed for every visitor. Container bloat also makes GTM hard to maintain, as making a change might impact a lot of other tags. To keep your GTM container small and lean, we recommend you: Reuse variables across different tags where possibleReduce the amount of custom JavaScript variables (having a consistent data layer helps)Regularly review GTM to remove unused tags (quarterly works for most of our clients) There are apps like Elevar which provide GTM templates for ecommerce sites that you may consider using. If you have different country stores with very different marketing tags required, you might also consider having a different GTM container for each store and reusing Littledata's GTM variable. Is using Google Tag Manager on your Shopify store secure? I've written before about how to prevent GTM being hacked, and the tips are still relevant today. In short, GTM can be a security vulnerability — especially when you let untrusted 3rd party tracking providers load their own script on your checkout pages. You can reduce the risk by having a developer review your GTM setup and being especially careful on checkout pages. What's next for Littledata's Google Tag Manager support? We regularly add new events and properties to better support tagging, so please contact us if you have suggestions. We are also looking at supporting server-side GTM (sGTM). Server-side tagging has the advantage of reducing the code loaded onto web pages (see best practices above) and handles customer data more securely. Littledata's servers already process sensitive customer data on our servers, so server-side GTM is a good fit with our philosophy of making tagging more robust and secure. In the meantime, I recommend you check out the Shopify to Segment connection, which provides these same server-side benefits without maintaining your own servers to host the tracking.
Do I need the Google Analytics tracking code on every page?
The script that triggers/sends the tracking events to Google Analytics must be loaded once (and only once) on every page of your site. While you don't need a Google Analytics consultant or Google Analytics consulting group to help you set up tracking, you’ll usually need either your Analytics tracking ID or the entire Javascript tracking code snippet to complete the manual setup. This corresponds to your Google Analytics property. To find the tracking ID and code snippet: Sign in to your Google Analytics account. Select the Admin tab. Select an account from the drop-down menu in the ACCOUNT column. Select a property from the drop-down menu in the PROPERTY column. Under PROPERTY, click Tracking Info > Tracking Code. The snippet provided here must be implemented on every page, even the pages you're not interested in. If you chose to not include the code on every page then: You will not be able to see the full flow of a client on your website. You will have inaccurate data about the time spent on site and actions taken. Visits to untracked pages will appear as 'referrals' and so will skew the volume of sessions. Marketing campaigns to the untracked pages will be lost. The easy way for an established website to verify the tracking is complete is Google Analytics > Acquisition > Referrals and search in the report after the name of your website, as shown below. You can also use Littledata's audit tool (hint hint). [subscribe heading="Try Littledata free for 30 days" background_color="green" button_text="Start my free trial" button_link="https://www.littledata.io/app/get-free-trial"] Choose your method for tracking setup There are several ways to collect data in Google Analytics, depending on whether you want to track a website, an app or other internet-connected devices. To select the best installation method for what you wish to track, here is the complete guide from Google. Once you have successfully installed Google Analytics tracking, it may take up to 24 hours for data such as traffic referral information, user characteristics and browsing information to appear in your reports. Some of these metrics include buying behavior, average order value (AOV), customer lifetime value (LTV) and more. However, you can immediately check your web tracking code setup. If you don’t think it's working correctly, you can check your Real-Time reports or use Google Tag Assistant to verify your setup. Enhanced Ecommerce tracking The main benefit of enabling Enhanced Ecommerce tracking (EEC) over standard tracking is the number of valuable reports you have access to with EEC. Not only that, but you can segment data based on ecommerce events — i.e. which users visited your product pages, where the customer journey hit a roadblock (e.g. a customer pondered a product but didn’t add to cart, etc.) or which steps of the checkout process a user abandoned their cart. This kind of data helps you zoom in on your sales funnel and change the parts of the process that don’t lead to conversions. At Littledata, we typically set up EEC with Google Tag Manager. Here's how to set up Enhanced Ecommerce tracking via GTM. Setting up Shopify tracking [tip]If you haven't already, check out our free Shopify connection guide[/tip] If you're on Shopify and using Google Analytics as your main tracking tool, you're in luck. Our new tracking code update for Shopify users is faster, more versatile and more efficient than ever before. We also have new features and updates in our Shopify app for Google Analytics. With the app, you'll only see fixed, accurate data in Google Analytics. This means you won't need to rely on the broken data in Shopify analytics or the incomplete tracking in GA's default view. Fixed marketing attribution and accurate shopper behavior are now at your fingertips. That means better, more informed marketing & sales decisions for your Shopify store. ?
Littledata's Shopify connection is now using gtag and GTM data layer
Littledata’s Shopify app is updating to use Google’s latest tracking code library. This will simplify your setup for Google Ads and speed up your site. Google’s ‘global site tag’ or gtag has been live for a year now and is stable for Littledata to adopt. In version 5 of our tracking script we now use gtag for all the events sent to Google Analytics. The advantages of gtag are: Integrates with Google Ads out of the box – no need for separate Google Ads conversion tracker Smaller Javascript library = faster page load times Future proof for using Google Optimize In addition, we are now using the standard 'data layer' format used by Google Tag Manager. This will make it easier for all you hackers to extend Littledata's tracking and use GTM with the enhanced ecommerce data layer, and easily create tags for marketing platforms like: Facebook, Criteo, etc. [subscribe] We've also moved to using the default ecommerce event naming recommended by Google. For example, the event category 'Ecommerce' is now 'ecommerce' (lower case) and event action 'Add to cart' is now 'add_to_cart' (snake case). If you have goals or reports based on the old event names you may need to update them. One final change is that we're only sending page views to GA when the page is not hidden in the browser. Certain advertising campaigns, including SnapChat ads, preload your webpages to provide a faster experience for users, but this skews your analytics with lots of low-grade visits who didn't actually 'see' your landing page. How to update the script If your store already has our tracking script installed, just click on the in-app notification to update. Not a Littledata user yet? If you're struggling with implementing Google Ads conversion tracking or GTM for a Shopify store, check out our Google Analytics connections for Shopify and Shopify Plus stores. Let our app fix your tracking, so you can get back to business!
How to stop Google Tag Manager being hacked
In two high-profile data breaches this year – at Ticketmaster and British Airways – over half a million credit cards were stolen via a compromised script inserted on the payment pages. Update 8/7/19: British Airways was fined a record £183m over this data breach, under new GDPR regulation. They are contesting the fine. Google Tag Manager is a powerful tool which enables you to insert any script you want onto pages of your website, but that power can used against you by hackers if you're not careful – and below we’ll look at how to stop GTM being a security risk on your payment pages. Firstly, how did the hackers get the card details from these sites? And how is it relevant to GTM on your site? Security firm RiskIQ has traced the breach to a compromised Javascript file which skimmed the card details from the payment form. So when a user entered their credit card number and security code on BritishAirways.com (or their mobile app) those details were posted to a third party server, unknown to British Airways or the customer. This is a high-scale equivalent of placing a skimming devices on an ATM, which reads one card at a time. In Ticketmaster’s hack the script was one loaded from a chatbot vendor on their site, Inbenta. Inbenta claims not even to have been aware the script was used on payment pages. The changes to the script were subtle: not breaking any functionality, and in BA’s case using a domain ‘baway.com’ which looked somewhat authentic. To protect your site against a similar attack you obviously need to lock down accounts used by your developers to change scripts in the page source code, but you also need to secure GTM – which can be used to deploy such scripts. We have a few rules at Littledata to help reduce risks in using tag management on payment pages: 1. Use pixels over custom JavaScript tags on payment pages You probably need a few standard tags, such as Google Analytics, on payment pages but try to avoid any custom scripts which could possibly skim card details. Many non-standard tags use JavaScript only to create the URL of a tracking pixel – and it is much safer (and faster) to call the tracking pixel directly. Contact the vendor to find out how. (Littledata's Shopify app even removes the need to have any script on the payment pages, by hooking into the order as it's registered on Shopify's servers) 2. Avoid loading external JavaScript files in GTM Many vendors want you to load a file from their server (e.g. myvendor.com/tracking.js) from GTM, so they can update the tracking code whenever they want. This is flexible for them, but risky for you. If the vendor gets hacked (e.g. with Inbenta above) then you get compromised. It’s less risky to embed that script directly in GTM, and control version changes from there (although a fraction slower to load the page). Of particular risk is embedding a tag manager within a tag manager – where you are giving the third party rights to publish any other scripts within the one tag. Don’t do that! [subscribe] 3. Lock down Edit and Publish rights on GTM Your organisation probably has a high turnover of contract web developers and agencies, so have you checked that only the current staff or agencies have permission to edit and publish? It's OK to have external editors use 'workspaces' for version control in GTM, but ideally someone with direct accountability to your company should check and Publish. 4. Blacklist custom JavaScript tag on the payment pages You can set a blacklist from the on-page data layer to prevent certain types of tags being deployed on the payment pages. If you have a GTM container with many users, this may be more practical that step 3. 5. Remove tags from old vendors There are many thousands of marketing tools out there, and your company has probably tried a few. Do you remove all the tags from vendors when you stop working with them? These are most at risk of being hacked. At Littledata we run a quarterly process for marketing stakeholders opt-in tags they still need for tracking or optimisation. 6. Ensure all custom JavaScript tags are reviewed by a developer before publishing It can be hard to review minimised JavaScript libraries, but worth it for payment pages if you can’t follow rules 1 and 2. If you’re still worried, you can audit the actual network requests sent from payment pages. For example, in Chrome developer tools, in the 'Network' tab, you can inspect what requests sent out by the browser and to what servers. It’s easy for malicious code to hide in the patchwork of JavaScript that powers most modern web experiences, but what is harder to hide is the network requests made from the browser to external servers (i.e. to post the stolen card information out). This request to Google Analytics is fine, but if the domain of a request is dubious, look it up or ask around the team. Good luck, and keep safe with GTM!
How to set up Enhanced Ecommerce tracking via Google Tag Manager
Enhanced Ecommerce (EE) is a Google Analytics plug-in that provides merchants with better insights for the shopping behavior of users. Enhanced Ecommerce tracking requires your developers to send lots of extra product and checkout information in a way that Google Analytics can understand. So why use it? [note]Update: If you are using GA4, the new version of Google Analytics, Enhanced Ecommerce will be a bit different. Read more about GA4 for ecommerce[/note] Why use Enhanced Ecommerce? The main benefit of Enhanced Ecommerce (EE) over standard ecommerce implementation is the sheer number of valuable reports merchants have access to with EE. Enhanced Ecommerce is necessary to get complete checkout funnel reporting and similar reports in GA. Not only that, but merchants can segment data based on ecommerce events — which users visited your product pages, where the customer journey hit a roadblock (e.g. a customer pondered a product but didn’t add it to cart, etc.) or during which steps of the checkout process a user abandoned their cart. It's essential to capture checkout funnel events, and EE helps with that. Tracking checkout funnel steps in Google Analytics doesn't just offer insight into the checkout journey, it also gives you the tools you need to set up custom funnels. Ultimately, this kind of data helps merchants zoom in on their sales funnel and alter the parts of the process that don’t lead to conversion. [subscribe heading="GTM data layer for ecommerce tracking" button_link="https://blog.littledata.io/help/posts/gtm-and-google-analytics-data-layer-for-shopify/" button_text="Learn More"] Enchanced Ecommerce implementation is no small feat, but it also depends on a number of factors — the size of your store, the number and type of Google Analytics custom dimensions you need to add, etc. Without question, Google Tag Manager is the simplest and best way to enable Enhanced Ecommerce in Google Analytics. If you already use Google Tag Manager (GTM) to track page views, you must send ecommerce data via Google Tag Manager. If you don’t already use GTM, it’s simple to set up: just activate Enhanced Ecommerce within your Google Analytics tags and use a dataLayer as an ecommerce data source. Just make sure the dataLayer contains all ecommerce data. Step 1 Enable enhanced ecommerce reporting in the Google Analytics view admin setting, under ‘Ecommerce Settings’ Step 2 Select names for your checkout steps (see point 4 below): Step 3 Get your developers to push the product data behind the scenes to the page ‘dataLayer’. Here is the developer guide. Step 4 Make sure the following steps are tracked as a pageview or event, and for each step set up a Universal Analytics tracking tag: Product listing view Product detail view Add to cart event Remove from cart event Checkout step 1 (views the checkout page) Checkout step 2 etc – whatever registration, shipping or tax steps you have Purchase confirmation Refund Step 5 Send the data to Google Analytics using the Data Layer. Instruct the tags to look into the Data Layer and pull the key-value pairs from the eCommerce object pushed most recently into dataLayer by selecting the correct Google Analytics variable. Step 6 This step involves checking the setup. After you have configured everything in place, you'll need to check your entire. What you should be looking for is: Are all the keys configured in the dataLayer.push() getting picked up and being sent to Google Analytics? Is the payload length too long? Is there a risk of data duplication with some hits? To debug these, you really only need three tools: GTM's own Preview mode, the Google Analytics Debugger browser extension, and Google Chrome browser's DevTools. Yes, there are plenty of other tools you can use, but these have proven to be more than enough in my own experience. [subscribe heading="GTM data layer for ecommerce tracking" button_link="https://blog.littledata.io/help/posts/gtm-and-google-analytics-data-layer-for-shopify/" button_text="Learn More"] Wrapping up Need some more help? Get in touch with our lovely team of Google Analytics experts and we'd be happy to answer any questions! At Littledata, our Google Analytics connection is the easiest way for you to automate GA for Shopify stores. With Littledata's app, you get: GTM and Google Analytics data layer that works automatically for ecommerce tracking, including checkout funnel tracking Seamless connections with apps like ReCharge and CartHook Raw data that remains available in Google Analytics or Segment Accurate analytics for Shopify with complete sales and marketing events captured automatically Try our Google Analytics app for Shopify free for 30 days on any plan. On Shopify Plus? Learn more about Littledata Plus.
Subscribe to Littledata news
Insights from the experts in ecommerce analytics
Try the top-rated Google Analytics app for Shopify stores
Get a 30-day free trial of Littledata for Google Analytics or Segment