Recent Post

Showing posts with label Code and Configuration. Show all posts
Showing posts with label Code and Configuration. Show all posts

How To Setup Enhanced Ecommerce Impressions Using Scroll Tracking

How To Setup Enhanced Ecommerce Impressions Using Scroll Tracking

A version of this post originally appeared on Google Analytics Certified Partner InfoTrust's site.
by Nate Denlinger, Web Developer at GACP InfoTrust, LLC

One of our specialities here at InfoTrust is helping ecommerce businesses leverage their web analytics to make better data-driven marketing decisions. This typically starts with installing Google’s Universal Analytics web analytics software and utilizing all of the functionality that is offered with Enhanced Ecommerce tracking capabilities.
Enhanced Ecommerce provides you with a complete picture of what customers on your site are seeing, interacting with and purchasing.
One of the ways you track what your customers are seeing is with product impressions (whenever a user sees an image or description of your products on your website).
Normally, you track what products users see or impressions by simply adding an array of product objects to the DataLayer. These represent the products seen on the page, meaning when any page loads with product images/descriptions, data is sent to Google Analytics that a user saw those specific products. This works well.
However, there is a major issue with this method.  Sometimes you are sending impressions for products that the user never actually sees. This can happen when your page scrolls vertically and some products are off the page or “below the fold”.
For example, lets take a look at a page on Etsy.com:
Sample page on Etsy.com (click for full size)
Here are the results for the search term “Linens”. Currently, you can see sixteen products listed in the search results.  However, in the normal method of sending product impressions, a product impression would be sent for every product on the page.
So, in reality this is what we are telling Google Analytics that the user is seeing (every single product on the page):
Sample page of Etsy.com (click for full-size)

Obviously, no one's screen looks like this, but by sending all products as an impression, we are effectively saying that our customer saw all 63 products. What happens if the user never scrolls past the 16 products shown in the first screenshot?
We are greatly skewing the impressions for the products on the bottom of the page, because often times, users are not scrolling the entire length of the page (and therefore not seeing the additional products).
This could cause you to make incorrect assumptions about how well a product is selling based off of position.
The solution: Scroll-based impression tracking!
Here is how it works at a high level:
  1. Instead of automatically adding all product impressions to the DataLayer, we add it to another variable just for temporary storage. Meaning, we do not send all the products loaded on a page directly to Google Analytics, but rather just identify the products that loaded on the page.
  2. When the page loads, we actually see what products are visible on the page (ones “above the fold” or where the user can actually see them) and add only those products to the DataLayer for product impressions. Now we don’t send any other product impressions unless they are actually visible to the user.
  3. Once the user starts to scroll, we start capturing all the products that haven’t been seen before. We continue to capture these products until the user stops scrolling for a certain amount of time.
  4. We then batch all of those products together and send them to the DataLayer as product impressions. 
  5. If the user starts to scroll again, we start checking again. However, we never send the same product twice on the same page. If they scroll to the bottom then back up, we don’t send the first products twice.
Using our example on the “Linen” search results, right away we would send product impressions for the first 16 products. Then, let’s say the user scrolled halfway down the page and stopped. We would then send product impressions for products 18 through 40. The user then scrolls to the bottom of the page so we would send product impressions for 41 through 63. Finally the user scrolls back to the top of the page before clicking on the first product. No more impressions would be sent as impressions for all products have already been sent.
The result: Product impressions are only sent as users actually navigate through the pages and can see the products. This is a much more accurate form of product impression tracking since it reflects actual user navigation. 
Next steps: for the technical how-to guide + code samples, please see this post on the InfoTrust site.

No Code Required: Auto-Event Tracking with Google Tag Manager

No Code Required: Auto-Event Tracking with Google Tag Manager

We’re excited to announce that Google Tag Manager has publicly launched Auto-Event Tracking, which lets you measure events happening on the page without writing HTML or Javascript. Those of you measuring events in Tag Manager today will already have minds racing with the possibilities - skip ahead to the screenshot. Everyone else, read on.


As sites become more dynamic and want to understand users’ site experiences in more detail, business owners need to know more: how long are visitors staying on a particular page? How are they interacting with interactive elements like image carousels? How many are clicking the Contact Me button? How many are clicking outbound links? Increasingly, site analytics are incomplete without answers to questions like these.

Unfortunately, until now, answering these questions required adding custom Javascript code to your website to tell Google Analytics when the event occurred. Google Tag Manager users also needed to modify the HTML of each page where they wanted to track an event. That means every time you want to track something new, or change the way you track something, you need to modify site code directly (or, in some cases, ask another colleague to do it for you.) And slower deployment of measurement campaigns directly impacts your ROI.

With Google Tag Manager’s launch of Auto-Event Tracking, we’re excited to announce a solution that provides the power of event tracking without needing to write code. By using the new Event Listener tag, you can tell Tag Manager when you want to listen for events, and then write detailed rules for what to do when an event happens. See an example of listening for form submits here:


Once you have your event listener set up, you can have tags fire based on form submits using a rule that looks for the event gtm.formSubmit. (Of course, Tag Manager supports more than form submits: it also includes clicks and timer events.) You can also make sure you’re getting the right form by using our Auto-Event Variable macros that let you narrow things down with attributes like the element ID and the form target.

The end result: you can deploy event tracking to your site and send event tracking data to Google Analytics without adding any code to your site. You can deploy measurement campaigns faster, and not writing custom code makes your solutions more robust.

Of course, it’s easiest to see the whole picture by walking through a full example. Check out the following resources for more:
We’re looking forward to getting your feedback - let us know what you think!

Posted by Lukas Bergstrom, Google Tag Manager PM

Browsing, Sharing and Importing Analytics Insights Now Just A Click Away

Browsing, Sharing and Importing Analytics Insights Now Just A Click Away

Earlier this year, we announced the Google Analytics Solution Gallery with a collection of custom reports, segments and dashboards selected by our team to help new users get started. Today we are excited to open the platform to the public and allow any of our millions of users across the globe to share their favorite insights via the revamped Google Analytics Solutions Gallery



In addition to opening the platform for public submissions, we have also worked to integrate the browse, import and share functionality directly into your account via “Share” and “Import” buttons. So whether you are using your favorite dashboard to get a quick view of your site performance or working to set up a new segment, sharing and importing via the Solutions Gallery is just a click away. 


The gallery currently enables you to browse, share and import Segments, Custom Reports, Dashboards and Bundles of up to 20 perma-linkable templates. More information on how to do so is available in our help center

In the future, we look forward to enabling the seamless sharing and importation of everything from filters to attribution models, to custom channel groupings so keep an eye out for developments in this space and let us know what you think are the most important things to share in the comments!

Posted by Joshua Knox, Google Analytics team

Is the web getting faster?

Is the web getting faster?

At Google, we are passionate about speed and making the web faster. A faster web is better for both users and businesses - faster pages lead to better user experience and improved conversions.

The Site Speed reports in Google Analytics give every website owner detailed data on the speed of their web pages, as experienced by real users.

Last year, we published a study on the speed of websites around the world based on one week of aggregated Site Speed data from opted-in web publishers.

Over the last year, we have seen significant improvements in the core infrastructure that powers the Internet: the web browsers have gotten faster; there have been quite a few LTE/4G deployments making mobile networks a lot faster; and processing power on mobile devices continues to increase at a rapid pace.

To determine whether these improvements in technology are making the web faster, we present recent Site Speed data and compare it with the data from last year.

Here are the results.



While access from desktop is only a bit faster, it is still impressive given that the size of the web pages have increased by over 56% during this period. It’s great to see access from mobile is around 30% faster compared to last year. This is evident from the histograms below as well. For desktop, there is not a significant change in the bucket distributions, but for mobile we see a shift from slower buckets (i.e. higher page load time) to faster buckets.



Taking a look at change in the speed of web pages for a few specific countries, for most of them, there is a slight improvement in page load times on the desktop.


However, there is a significant improvement in page load times on mobile.



The following interactive world map compares the relative improvement in median page load times for desktop over the last year.


This map shows the same data for mobile (Countries without enough data for accurate measurement either this year or last year are shown as having 0% improvement). Speed improvements are greater for mobile in most of the world.


If you are a web site owner, you can analyze and speed up your web site using the PageSpeed products, and check the resulting improvements in Site Speed reports.


Verify Your Measurement Setup With Tag Assistant

Verify Your Measurement Setup With Tag Assistant

Google Analytics is, at its core, a simple and powerful tool. But once you start to customize the code to take advantage of all the flexibility available you may find yourself needing some help troubleshooting a nagging issue. 

A new Chrome Extension created by engineers here at Google hopes to make troubleshooting tag installs much easier. Tag Assistant aims to highlight errors, warnings, and provide useful suggestions for Google's most widely adopted tags including Google Analytics, Google Tag Manager, Adwords Conversion Tracking, the new Remarketing Tag, Trusted Stores and Floodlight. 

After installing the extension, Tag Assistant will alert you if tags are found on any page you are currently browsing. For each tag we will tell you if it appears to be working or if we notice any problems with your implementation. Tag Assistant will even make recommendations on how to improve your installation if we notice any optimizations. For example, if you have 2 or more tags implemented separately we might suggest that you migrate to use Google Tag Manager instead. 



How does it work? Tag Assistant looks for errors in two different ways. First, we check the source code to look for common errors like forgetting to include a closing </script> tag. We also review the HTTP headers to ensure that we are getting expected responses. 

Since launching in October of 2012 we have collected a lot of your feedback and have added dozens of new checks. Over the course of the year we will be adding more checks that will make the Tag Assistant more accurate and helpful. 

We encourage you to try it out for yourself by installing it via the Chrome Web Store. If you have feedback on new checks to add or if you have questions about the tool, join our Google+ community where our team and users can help you out.

Posted by Geoff Pitchford, Google Tag Assistant PM