Hello There!

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

 About Ravi Pathak

Ravi is the co-founder of Tatvic and expert at managing different web analytics tools. Ravi actively works on conversion optimization projects to improve conversion rate and test newer hypothesis with e-commerce companies.

How to make tagging plan for Google Analytics| Google tag manager

tagging plan for ga/gtm

A Tagging plan is a running document that web analysts and implementation teams use to keep track of data collected from respective web analytics tools. When starting some engagement for Google Analytics, many times, I have seen enthusiastic developers firing GA events everywhere and the possible claim being we are tracking everything, but when asked why it is getting tracked, most of them lack proper reason. The standard Google Analytics tracking code works great for basic tracking. And most online businesses can benefit from careful planning and using advanced tags, such as Events or Custom Variables, Custom Dimensions, etc. Documentation in such cases is very very important to keep good control over your web analytics tool.

Why A Good Tagging Plan Is Important?

1. Data Quality & Testing

All your great data analysis & reporting is a function of good data. Good data will enable your team to take fruitful(in our case ROIData Quality generating) data-based decisions. As a web analyst, I see this as a huge win for carrying out other heavy-duty analyses.

In the absence of good documentation support, what tags are firing, and what data points are collected will not be coherent. Often as an analyst, you will not know/remember what tags are firing on what page and eventually, lose the track of data collected and its meaning.

Moreover, with a good tagging plan, you can use tools like Hubscan to make it easy for tools to carry out automated testing of data collection & improve the quality of data collected by Google Analytics/Adobe SiteCatalyst.

2. Smoother Entry To Your Analytics Team

A good tagging plan ensures that every analyst/developer within the organization will know which tag fires on what pages related conditions for it.

This ensures smoother entry for any new analyst. Quite often analyst would have backgrounds in statistics & data analysis theoretically but not how to practically carry out data analysis and what tools or techniques facilitates the same. This sort of plan helps them understand what data is available and how they can make use of this data for their analysis.

3. Agency CollaborationAgency Collaboration

When you have many agencies working for you on different campaigns, having different teams follow one standard practice of data collection is of huge advantage. With a good tagging plan & standard guide, you can just ship it over to the agency that is launching a new site so that the Agency IT team exactly knows what are they supposed to do for different tags.

What Is The Content Of a Good Tagging Plan?

1. Analysis And Regular Reporting

A tagging plan must have background information on what analysis & reporting is required. This way tagging plan can ensure that the required data is being collected in the desired format. A tagging plan must have report samples and current & future analysis planned so that data collection is smooth.

2. Coverage Of Domains, Pages

A good tagging plan must have coverage defined in the form of which all domains a given tagging plan covers & what are pages (URI)are covered for customization. This should be generally in the form of a spreadsheet that has at least the following details.

3. Naming Convention & Standards For Custom Implementation

A standard naming convention helps in ensuring that the data collected is consistent across multiple sites. For e.g. when we work with clients, we have following global rules that we follow:
a. Never use space in passing values
b. Always use lowercase values for variables
c. Always use names with less than 30 characters
d. Always use names rather than IDs (e.g. use product name vs. product id)

When such global rules are set as an analyst, it is easy for a new developer to develop new tags, or a new analyst to start a new analysis project.

4. Configuration Details

Often what & how your data is available in your web analytics tool is decided by some configuration parameters e.g. if you use filters & profiles in Google Analytics, you can see the entire URL of the page vs. the path that you normally see in content reports. Having a centralized repository for knowing the configurations, helps analysts to know in exact detail as to what data he/she is seeing. Generally, to start with Google Analytics it should contain the following:

List of goals & the URLs associated with it
List of profiles & associated filters with a purpose for each filter/profile
Settings summary (different settings for GA)

5. Campaign Tags

Most successful online businesses run a variety of campaigns e.g. AdWords campaigns, email campaigns, and publisher-driven campaigns. Very likely these campaigns would run via different agencies or different internal teams. But data collection happens at a central place i.e. your web analytics tool. To ensure that all the campaigns are tagged properly so that campaign ROI is successfully measured, it is imperative that your tagging plan includes the details as to how different campaigns should be tagged. If you are using Google Analytics, this boils down to how you use the UTM parameters to track different pieces of incoming traffic to your website. A generic policy that we use is as follows:

Medium: This should be the simplest way to describe the general channel being used to draw visitors.
CPC (as a proxy for “paid search”), display, content-text (for contextual text ads), social, email, affiliate, pse (product search engine), video, local
Source: This should be a clear indication of where the traffic originated from. Should not include www. or .com (for consistency)
Campaign: Should describe the common feature(s) of a marketing effort, such as the name of the media campaign, target audience or geography, or the desired outcome
Content: Should provide any additional valuable context that could be used for optimization: ad copy and format, time sent (for social media or email), etc.
Term: Should only be used for paid search, but could include category targeting for display

To automatically append bulk URLs with these parameters, you can use this tool.

How to Google Analytics Calendar Heatmaps?

visits

As a data analytics consulting firm, we think we are fortunate that we keep finding problems to find. Recently my teammate found a glaring problem of not having any connector for R with Google. With inspiration from Michael, and Ajay O, it soon becomes a worthwhile problem to solve.

With the RGoogleAnalytics package now, we have solved the problem of data extraction into R from Google Analytics a new breed of ideas started emerging primarily around visualization. I have been playing with GGplot2 has been a great package to convert data into visualization. Thanks, Dr. Hadley Wickham. Once you have followed this blog post, you are with the code there in a position to have the data required to get these calendar heatmaps done. Take up the below-given code and paste it into the R console and play around to see if you find it easy to work thru. If you have trouble, feel free to reach out to us.

Here is the code for extracting the Google Analytics data using the R-google Analytics package. Before running the following code, download the RGoogleAnalytics package and install it.

#Load RGoogleAnalytics library
library("RGoogleAnalytics")

# Create query builder object
query

For this example of a Calender heatmap, I am using data from an e-commerce store with data for more than 2 years in business. I will be plotting visits as well as transactions on the calendar so that I’d get perspective on how they interact viz-a-viz timeline.

Here is the code for plotting the heat map after you get data and have it stored in ‘data’. This frame is used to reference the source of data for the visualization below.

# Recommended R version - 2.15.1 or higher 
# install required  library by using the command install.packages(“libraryname”)
# For example install.packages(“ggplot2”)
# Required library
library(“quantmod”)
library(“ggplot2”)
library(“reshape2”)
library(“plyr”)
library(“scales”)

# Set extracted data  to this data frame
data

Once you run the code, you will be in a position to get the output like the below:

Now that we have a calendar heat map for visits, let me pull it off for transactions. In the above code for Google Analytics data extraction, you have to use transactions as well as visits as metrics. Since the data is already available in the ‘data’. we are ready by changing in code of visualization to choose the heat map for the transaction now.

It’s quite interesting now that you can make super nice inferences as I did below:

  • Tuesdays have high visits days but Wed has been the day when most transactions occur.
  • Visits increase towards the end of the year (shopping season) and then slow down towards the year’s start.

Visualization is an interactive process. Based on the feedback received from some of our readers, I tried plotting both KPIs on the same graph. With ggplot2, it was as simple as adding a line of code. Again some minor tweaks in the background colors and we are ready with another heat map.

ggplot(data, aes(monthweek, weekdayf, fill = visits)) +
 geom_tile(colour="white") +
 facet_grid(year~monthf) + 
 scale_fill_gradient(high="steelblue",low="white") +
 theme_bw() + 
 geom_point(aes(monthweek, weekdayf, size=transactions,alpha=transactions),color="firebrick") +
 theme(panel.grid.minor=element_blank(), panel.grid.major=element_blank()) +
 labs(title = "Time-Series Calendar Heatmap") +
 xlab("Week of Month") +
 ylab("")

 

Would you like to understand the value of predictive analysis when applied to web analytics data to help improve your understanding relationship between different variables? We think you may like to watch our Webinar - How to perform predictive analysis on your web analytics tool data. Watch the Replay now!

 

How to do Shopping Cart Analysis for E-commerce Websites?

item_revenue_in_rs

Of late we are working a lot on predictive modeling for e-commerce data and implementing interesting ideas using GA. Lot of our analysis leads to one conclusion that the lower end of the funnel is almost always presents lot of opportunities for improvement.

One of the other interesting problems that we encountered was to connect with the product manager who is interesting in optimizing the inventory and making sure that he learns usage patterns at a lower end of the funnel for different product. To tackle this interesting challenge, we had to get lot of data for products SKUs & have user action as metadata for these SKUs.

Data collection

We added following four interesting user actions on product page of an e-commerce stores, with the purpose to get a uniform metadata around product. The way we used the Event tracking here was

_trackevent(category, action, opt_label, opt_value,opt_nointeraction)
nomenclature : _trackevent(pp-product view, gender,product code+brand,price,true)

which can be converted into sample code that can potentially look like this ;

_gaq.push([‘_trackEvent’,’pp - product view’,’women’,’abc12332423’,’1999’,true])
  • Product view
  • Add to Cart
  • Feature selection
  • Wishlist addition

This can easily become a standard to use when user adds product to cart, or selects a color or adds a product to wishlist.

This way we extracted metadata of products along with additional metrics for the product to help product manager gauge what’s going on with the lower end of the funnel, which typically comprises of cart & check out pages.

If you have done several e-commerce implementations you can clearly realize that this method can provide very effective metadata for each product, in form of categorical variables like ,which gender it is aimed towards, brand & action occurring on this product (i.e. view, add to cart, feature selection, wishlist addition). The other additional ordinal variable data that is possible to beget is time spent on product , views, unique views, etc.

We also added similar type of event tracking implementation on cart page, which effectively also helped us provide product metadata

_trackevent(cp-product removed, gender, product code + size+brand,product proce,true)

That eventually translates into values like  below:

_gaq.push([‘_trackEvent’,’cp - product removed’,’men’,’xyz10234’,’1500’,true])

At the end of this implementation you would stand gaining such a beautiful set of data that you can do wonders with. Click on the image below to see the larger version of data yourself.

Product revenue table[click on image for full-size image]

Above data clearly will help to establish a relationship of each individual products revenue with its # of instances of cart addition, # of instances of removal, # of instances of view as well.

Using this dataset, we can create a visual representation of how the relationship between product views  & product revenue exists as below, thanks to ggplot2 & R

item_revenue_in_rs

All the products which falls in the area of above the curve, ie. High product views but low on revenue, needs work to be done. For such products a different strategy may be required, may be a specific campaign or a discount or something, but these are those products which are getting viewed but not bought.

Additional research can also be done to check what the relationship with product views is & cart add like below:

 

Cart add unique view

Dots in above chart represents # of people viewed the product vs. # of people added it to cart. Clearly, there are products which people are not adding to cart and require further research as to whether it is due to price, or shipping or competitive pressure that people are not considering to add this product to cart.

In the next post, I’d describe a linear relationship model that is able to predict the quantity of product sold based on factors such as views, alerts set, wishlists etc.

Shopping Cart Value Vs. Page Depth in Google Analytics

Page depth vs Cartvalue

I have been quite interested in machine learning and how the data visualization is expanding using different machine learning languages like R & Octave.

In a recent e-commerce project, one of the needs was to understand how people add & remove product to the cart. The more important question is how often & when the engagement with the site leads to the increase in the cart value.

To understand this we had added to the custom variable which contained cart value that gets fire on each page. That seems like below:

var _gaq = _gaq || [];
_gaq.push([‘_setCustomVar’,
2, // This custom var is set to slot #1. Required parameter.
‘cartvalue’, // The name of the custom variable. Required parameter.
‘0’, // Sets the value of ‘Cart’ depending on status. Required parameter.
2 // Sets the scope to page-level. Optional parameter.
]);

Above code ensure that a custom variable will fire a call on every page containing value of the shopping cart at a given page.

And we had page depth which is a pseudo indicator of how people progress towards the site.

To understand the relationship between cart value & the page depth, we extracted following data i.e. what is the value of page depth & cart value for different visits.

The data looked like below:

 

Relationship between cart value & the page depth
Relationship between cart value & the page depth

(note: we are using R & ggplot2 to analyse the data)

If we plot the chart with page depth as horizontal axis & cart value as verticle axis, It summarizes that after page depth is  20, cart value increases but after 30 till 40, the rate of increases is significantly faster. Also if you notice the brown colored cover around the line is an indicator of variability at that point in axis.

Page depth vs Cartvalue
Page depth vs Cartvalue

Interestingly when you plot this chart along the actual revenue vs. page depth chart, you start seeing the difference.  Addition to the cart is a happening after 20 page depth but that doesn’t seem to be translating to the actual revenue.

Page depth vs Cartvalue 2
Page depth vs Cartvalue 2

So is it to conclude that lot of products are getting added to cart after specific amount of pages being viewed but that doesn’t get translated into revenue?

I’d differ here as I unearthed more  relationship of pagedepth & visits as depicted below:

 

Page depth vs Cartvalue
Page depth vs Cartvalue

The drop if you see from 5th Page depth to 20th is significant but that is not as fast a drop that you would see in revenue when you do this. This means that the visitors that are between 10-30th page depth are best of your visitors who are great at getting themselves converting from browser to buyer.

Launched Multi Profiles feature for Google Analytics Excel Plug-in

How to update Tatvic Excel Plug-in

Recently, we had some excellent clients who have been demanding a unique feature that reduces the time for analysts who manages larger accounts with more profiles.

The request was to have the ability to extract multiple profile data within one query. The use case was:

“I manage about 38 countries’ dashboards within one Google Analytics accounting with 38 profiles dedicated for each country. I have to compare visits, time on site, etc all the time and the only way to do it is via creating many more queries in the Excel plugin- Is there a better way “

And we said “yes”. We figured that if we allow the country name to be extracted from the list of profile names written in Excel, we can pass that in our query and have it extracted from Google Analytics.

Here is a quick video representing the same.

In addition to this, we also have worked out a similar solution for the advanced segment. For e.g., if you have 10 advanced segments that you would like to compare for their performance against the same metrics, you can do the same as described in the above video for profiles.

As we continue to build more features, we are more committed to listening to ideas that you are looking forward to automating, please feel free to reach out to us if you have any feedback or feature requests for the Tatvic google analytics excel plug-in.

Note: To use this feature, you’ll need to update your Tatvic Excel plug-in. Here’s how to do it:

  1. Before logging in to the tool, click on “Check for update”.

    How to update Tatvic Excel Plug-in

  2. Click on the link that appears at the bottom of the tool.

How to update Tatvic Excel Plug-in

Done, enjoy the feature now.
Thanks again!

50 Custom Variable For Google Analytics Premium

Recently, Google released an upgraded version of Google Analytics as “Google Analytics Premium“. We had been following some conversations on Twitter about it and have been speaking to clients about important features of premium. One of the key features that users of Google Analytics Premium are going to enjoy is having the ability to use 50 custom variables.

This if implemented well, can save tons of hours in analysis, and reporting. IMHO, this is probably the most valuable feature of GA premium compared to other features more shiny features. (if you disagree, feel free to shout out) During several conversations, it struck me that a lot of analysts would have a hard time figuring out how they can use 50 custom variables and I thought it would be great if I just put down, how would I use it in standard ways for different categories of websites. i.e.  E-Commerce, Lead Gen & Content.

Therefore, I am starting a blog post series to explain how best to use 50 custom variables in Google Analytics for an e-commerce site, and in the following weeks, would talk about other types of websites.

As we are aware there are three different types of custom variables available:

Visitor Level: Used for tracking interactions of a visitor across multiple session

Session Level: Used for tracking within session activity of a user.

Page Level: Used for tracking page-level activities ie. Button clicks etc.

All custom variable keys & values are stored in cookies and they expire at different times. For e.g. Page level custom variable value gets expired when the user moves to the next page, visit level gets expired when the visit is ended.

Here is the starter list of custom variables for Page Level:

  1. Page type:
    Name the type of page. You can track different page types. One way to do it is to use the research that Gary Angel & team researched on functionalism.
  2. Search Results Rank:
    For all the e-commerce sites, this becomes vital to understand how the internal site search is performing. There are ways to do it, but knowing the search ranking of your internal site search would tell you if you need to tweak there or not. I also had an old blog post on the value of internal site search if you may want to review the importance of it.
  3. Wishlist ID:
    If you have a wish list, you should capture its id there to help measure which products are being added to the wish list. You can have the wishlist ID & the SKU as key-value pairs respectively.
  4. Product View - Product SKU:
    An extremely important data in e-commerce that gets frequently missed is product conversion rate. i.e. ratio of product purchase to product views. The key value pair here could be product view & SKU or product name.
  5. How much % of the total page, the window is viewing:
    A lot of time, you need to understand how much scroll users are doing as most of the time users would not be scrolling down and some of the important communications that are in the second fold of the page get ignored. The key & value pair could be oc-<url of the page> & % of page viewed. You can use some of the nice plugins like this(need to find the link) to achieve this or use analyticsengine.net to get it done. This should be page-level. Here is a good resource to get started
  6. Product Category:
    Product category should be tracked to understand the relative popularity of a given category and since this is tracked only on a category page, the key-value pair could be product-cat & category name/category id.
  7. Variation/Size of Product:
    Often lifestyle stores would have additional items that a visitor needs to select. For example, size in the case of clothes/shoes. This should be an onclick type of call that should fire setcustomvar function.
  8. Color of the product:
    Again this is more applicable for lifestyle e-tailers, but significantly important as different colors can fetch different pricing.
  9. Filter Type/Sort By:
    Often on a category page or similar page, your e-commerce stores may be displaying products in the default way, but you may have the functionality to display prices from low to high or something similar. You must track if there is a change in the filter. Key Value pair could be filter type-> values in dropdown.
  10. Internal Promotion ID:
    A lot of large websites have multiple sites, and multiple divisions owning different web properties. If there are internal promotions that are carried out, you need to track them specifically. The key value pair here could be IPID & nomenclature that is used for internal promotions.
  11. Cart Add -Product SKU:
    A brilliant understanding of shopping cart behavior could be possible when you understand how many & which products are added to a shopping cart by users. The key value pair would be cartadd & product sku/product id/product name.
  12. Cart Remove -  Product SKU:
    Similar to the above, it would be a great understanding to learn which products are being removed from the carts and what do people after removing the cart. A key-value pair for custom variables could be cartremove & product SKU/product id/product name
  13. Cart View - Product SKU:
    Another super duper dimension that you can generate with the Cart View is to understand how many times the cart is viewed without another product being added. A key value pair here could be cartview & product sku/product id/product name
  14. Add to Compare - Product SKU:
    If your website is having comparison ability, you have to understand which SKUs are getting compared the most & you need to track this information.
  15. No.of Search Results:
    Google Analytics has great tracking abilities for internal site search; however, one critical thing to understand is # of search results for a given search within the site. When you see 0 results or fewer results for any keywords, that will be a great pointer to understand. A key value pair could be SR count & integer displaying no.of search results.
  16. Product SKU- Product Ratings:
    If you are using services like Bazaarvoice or similar which provides product ratings, you should track it to understand if there is any correlation between higher product ratings & increase in the revenue of the product which I believe there is. A key value pair would be rating & SKU/product id/product name.
  17. URL - Action (Print, Share, Email, Favorite ):
    This is very subtle, but a lot of product pages have a few actions that some of the users do perform that are not social in nature, but important to know. They are generally, printed, shared, emailed, or mark it as Favorite. To track this the key-value pair could be the URL & action name.
  18. Discount % on the product page:
    If you are offering a discount you should track it to understand how different discount works. The key value pair here could be product SKU & % discount.
  19. Product Brand Name:
    It has been very interesting to know the X & Y dimension of any links that being clicked. You can always identify where on a page the link is placed has a higher likelihood of getting clicked. The key could be the Link location & value could be x & y coordinates. If you are selling products of different brands, and you would like to know which brand is more popular, you should have key-value paired with the brand & values of a brand name that exists on the product page
  20. Link Location on the page:
    Most of these are suggested as page-level variables but you can have at least some of them used as visit levels and have it expire on the transaction page as well if you want to. There are benefits to it and disadvantages as well, but I’d talk about them at some other time.

Visit level Custom Variables

  1. Coupon used:
    If you are a heavy player on coupons, you ought to understand how the coupons are used. Are users just redeeming or also purchasing after redeeming as well. The key-value pair could be coupon - coupon_name+discount.
  2. No.of browser Plugins:
    If your target market is technology-related website visitors, it would be interesting to understand their browser usage via how many plugins they have downloaded. With this script, it tells me that I have 18 plugins installed, and I am fairly technical so you classify, how many users with strong technical backgrounds visited your website. The key value pair could be no.of plugins & integer value coming out of that script.
  3. Local hour of the day:
    The hour of the day report in google analytics reports at what hour (“from the standpoint of your timezone”) how many visits have come or how many leads / Revenue has been generated on a specific day in an hour. However, what you need to know is the visitors’ local time. So if you are in New York, it’s 1 pm, whereas, at the same time you are in San Francisco, you would have 9 am coffee. You need to understand, what’s the local time when people buy your product, irrespective of what timezone they are in. This will provide a huge understanding to you about your user’s buying patterns in terms of when they buy. Key Value pair could be local_hour & integer representing the hour. Further, you can also have value as morning/afternoon/evening/night defined based on different values of the hour for further simple analysis.
  4. Currency
    Often if you have a store that sells to more than one country knowing which currency the user bought your product with is more important. You can set it as a visit-level custom variable to be expired at the end of the transaction & start it to be populated when the user is seeing a product page.
  5. Recommended or normal product view
    A lot of e-commerce stores have the ability to show product recommendations, Most web shop owners don’t realize how much important it is for them. Placing a custom variable to know whether the product view is recommended or not, helps a lot.
  6. No.of bookmark items in the browser:
    # of bookmarked items provides the information about maturity of the user. The more items bookmarked, the more mature the user is & more likely to share your content.
  7. Google Search Results Position:
    There is a nice little nifty javascript available again by John Doherty & Michael King here which helps you to figure out the actual search results position in the case of Google. There are surely other ways as well, but important is to get this position figured out quickly.
  8. Shipping Method:
    The shipping method provides a highlight into what kind of shipping method is more likely to be used by users. If you are considering free shipping, you can also revise the workaround to get this going.
  9. Payment Type:
    When users are presented with different modes of payment, it is very likely that these different payment methods cost you different charges associated with them, but knowing which payment method brings different volumes would yield, huge insights on what kind of plan to choose for payment type.
  10. No.of Cart Items:
    At any stage visitors if you know the # of items present in the cart is an interesting fact to know. It also helps to figure out how users add the second product to the cart & how long it takes them to do so. You may have to rewrite some cookies here if you choose this as a session variable.
  11. Value of Cart Items:
    Related to #30, if you know the value of cart items during different visitor activities, it helps you identify, what is the avg. wallet-size users are willing to shell out for your products.
  12. Minutes to Complete Purchase:
    It would be interesting to know & to evaluate the effectiveness of webpages leading to product pages to understand how long it takes to have a user complete the purchase starting from a session. If you see that it takes less than a minute for users to finish it, you might want to break it down by a count of visits to see if these are repeat visitors who are just coming back to buy something that they already have planned.
  13. Minutes to add the product to the cart:
    Similar to #32, it would be a great help to understand how long it really takes users to add a product to a cart. This information measures the effectiveness of category pages & product details pages.
  14. Shipping City:
    Knowing the shipping state & if broken down by city helps you figure out whether users are buying your products for themselves or they are buying for others.
  15. Product Stock Status (in stock, out stock)
    Quite often when a product goes out of stock a webmaster would get a notification & it would be taken away. A smarter way is to keep it there and add a couple of lines “Notify me when this is available”. When you track such things you are aware of the popularity of some of your products that are out of stock.
  16. Name of Product Manager/Brand Manager:
    For large corporations, different sets of web properties and products/brands are handled by different brand managers. Even product promotions have different strategies. At the end of the day, it boils downs to a single person. Brand Manager/Product Manager. To know how effectively the web has been used by the brand manager & compare it with others, you may want to put the Name of the product/brand manager in the custom variable of course abbreviated.
  17. Product Margin type (high, low, medium):
    Different e-commerce products have different margins knowing margins and how users react to products with different margins, would be a huge insight for a web analyst to promote different products. You don’t necessarily have to add the exact % of the margin just keep it at high, medium & low.
  18. Day type (weekday vs. weekend):
    There are products that get sold on weekdays Or a few products, especially on weekends. Most people do not know about it, when you break this information with what has gotten sold or what’s the revenue proportion between weekdays or weekends, it would help immensely in devising new product launch strategies. You can also append it to have information on whether this day is a holiday or not to understand if your product is bought more when people are at work or whether it is bought when people are at home.
  19. Location Type (metro vs. Non- metro):
    Geography, when classified appropriately, i.e. metro area vs. non-metro area, it helps to figure the difference in avg. order value. You can change your Adwords strategy based on it.
  20. Market Type:
    Most large companies have their own defined market types, done in a variety of ways that are beyond my imagination. Having market type placed in Google Analytics would help to measure market type performance within Google Analytics itself.
  21. Deal of the Day:
    Most e-commerce sites these days offer the deal of the day, knowing that this product is sold via the deal of the day will help you figure out what kind of products to be offered for the deal of the day. The same strategy of measurement can be used if you have a deal of the week instead of a deal of the day.

Visitor-type custom variable

  1. Visitor ID:
    Hugely important if you are doing some custom analysis or prediction for data collected, having a primary key is of utmost importance. However, as per TOS #7, you can not use it to match it with any personally identifiable information of users.
  2. Registered/Non-Registered User:
    Lots of times, you have buyers who may have registered earlier, but now coming back to buy a second time. If you are doing some analysis like, customer life cycle value, categorizing visitors based on registered or non-register would be hugely helpful.
  3. Password reset:
    Sounds very trivial but to me, it’s most important. These days, people don’t bother to remember less than a critical password, if a lot of users are sending reset password requests, this might be alarming to you might want to consider guest checkout or may be signing up with Facebook.
  4. Buyer Type (new buyer vs. returning buyer)
    You can always have data about whether this visitor is a repeat visitor or not, but it’s seldom the same as a new buyer vs. returning buyer. The new buyer is the one who registers with you to buy the product whereas returning buyer is the one already registered with you to buy the product. You can have more criteria to decide whether this is returning buyer or a new buyer, but whatever they are, an important fact is, you have to know whether this transaction is by a repeat buyer or a First-time buyer. What this essentially means is that you ought to have a better methodology to identify a repeat buyer than just Cookie 🙂

Got it, so where does the rest of the 5 other variables exist? I thought hard about it and realized that if you have read this far, You would have certainly a few ideas that I couldn’t think about, if you do, share them and we can make the rest 5 custom variables together :)!

Hope you enjoyed it! let’s give a few more custom variables to the next reader 🙂

Google Analytics Blog: Introducing Google Analytics Premium

Launch of Tatvic Google Analytics/Adwords Excel Plug-in Version 2

I am extremely excited to announce the v2 of the Tatvic excel plug-in. We have been working on it for so long and it’s a great feeling to see it getting light in the real world.

In this blog post, I want to pass on some key features that we’ve built over some time.

More APIs = More data

We are now offering the ability to extract data via Adwords API, Keyword traffic estimator on top of Google Analytics data export API. We wanted to remain in the direction of Google Analytics as it firmly integrates with Adwords. You will, however, need to have an Adwords API token and you can only use it for an MCC account though.

You can watch an example of how you can extract keywords data via Adwords API below:

How to Extract data from Adwords API?

You can moreover, extract data from the keywords estimator tool as well. This is the first application in excel which can get you data from the Keyword estimator to understand how much traffic you can get if you go ahead with a specific keyword.

How to Extract Data from Adwords Keywords Estimator API?

Save/Share query:

With the new google Adwords excel plugin, it’s easy to remember a set of inputs that you provided to pull out specific reports so that you can reproduce them or share them with your colleague. We are also working to add a few more APIs e.g. SEOmoz as well but haven’t matured it as yet. If you have an opinion on what other APIs we should be adding to the excel integration, please feel free to reach out to us. Your opinion is most valuable to us.

Challenge to Online Marketers

Working at a web analytics company we have find an interesting pattern of customers and especially those who are decision makers.

Decision makers are alone. They know inside themselves, that there is no perfect world, online or offline. If you face following questions, read along!

  • You fear that you are making decision based on wrong data collected via Google Analytics/Omniture.
  • You don’t trust the data as well as your manager, even if analyst makes hardest effort to convince?
  • You cannot make decision & delay taking a decision since on your google analytics/Omniture data just doesn’t have what you need?
  • You pay for incredibly large amount $$ for Google Analytic/Implementations implementation and don’t know what decision you can take?

 

I say “Welcome to the show” - You are not alone. Its Act 1.

Web Analytics tool implementation is sub optimal

Over last several (6years), I have been involved in Google Analytics & Omniture Implementation a lot. Quite a bit of the time, it involved cleaning up the Google Analytics/Omniture implementation done either by agency or client on their website/e-commerce store. A huge learning that we recently relayed internally was the fact that, most of the time either implementation was erroneous, either it lack action-ability , or may be even mistaken. This happened in 85% of the cases of implementation when Google Analytics was implemented by non-GA expert.

Problems with Web Analytics Implementation were not known

However, this problem is sub-optimal implementation of Web Analytics tool is both not known, not identified, well enough. Its normal that if you don’t know the problem, you are less likely to know the impact & you are not going to make any effort to solve that problem.

Challenge to Online Marketers:

Lot of people including you, my reader, may feel above two paragraphs are not right & doesn’t represent your situation as Leader in Analytics in your organization. Great!!

Why don’t you do act 2 then. Here is the challenge.

Show the world what actions did you took which helped your online business. You can be discreet & okay not to disclose the actual figures, but come forward & show the world that whatever was the analytics, you took decision & the online organization was benefitted. I am not saying that it is not possible to take good business decisions based on Google Analytics, I am just saying that its rare.

Comments section is yours. Do you second act my friend!

Okay if you cannot! It’s time to roll up your sleeves and carry out the Google Analytics Audit /Omniture Audit. If you need how to do it, sample reports, download free from Audit section.

Looking forward to Act 2.

 

Google Analytics Worldpay Ecommerce Tracking

Google Analytics Ecommerce tracking for Worldpay

Tracking worldpay transaction with Google Analytics & getting ecommerce data in most accurate manner is amongst one of the challenging project that we executed for one of our clients recently. I wanted this blog post to address what we all did to capture most accurate Google Analytics data possible into worldpay.

Several issues need to be addressed before proper e commerce tracking can be executed.

Here is the design how worldpay works:

Worldpay doesnt allow javascript to be executed on their domains. So you cannot post any Google analytics code on green boxes as describe above. So technically, nothing can be tracked post step no.1 as described above.

To make this tracking work, several things needs to happen.

  1. We need a thank you page after worldpay transaction finishes which is on a domain where javascript can be executed. That is, we need to have one more step after (3) occurs which pushes user to move from (3) to a new page. That is the page where we can place Google analytics ecommerce tracking and track the value of transaction. Let’s call it step no.(4)
  2. More importantly, we need to pass all the Google analytics cookies to this thank you page ,so that the ecommerce code that gets executed on step no.4 attributes the transaction to original cookies that were present on product page or step (1).

So essentially we need to have a page at step (3) that provides a button on Worldpay that says click here to finish the transaction. I will come back later as to what other things that button needs to do.

So till now , by having that button “click now to finish the transaction” ,one problem is solved so that we have one page where we can put GA code & execute the addtrans etc functions of Google Analytics.

Lets focus now on how we can pass on same cookies that existed on step (1) to step (4). Normal google analytics functions of linkbypage will not work as they can only work if the next page can fire Google Analytics.

This is where this gets really innovative.

You can get all the required cookies one by one. But, there is a simple way to get all GA cookies required at once. By using the method, pageTracker._getLinkerUrl of Google Analytics, which will give you all the cookies required along with the URL.

Now, there is a concept of hidden variable in Worldpay. Hidden variables can pass different values like price, currency, order type etc. You can create a new hidden variable and pass the Google Analytics cookies into these hidden variable.

Generally, the RBS World Pay form (where the RBS World Pay button is located and from where the users goes to RBS World Pay site for payment) looks like the following:

<form action="https://select.worldpay.com/wcc/transaction" method="post">
	<input type="hidden" name="cartId" value="Cart ID">
	<input type="hidden" name="desc" value="Product Desc">
	<input type="hidden" name="currency" value="GBP">
	<input type="hidden" name="amount" value="XX.XX">
	<input type="hidden" name="instId" value=137379>
	<input type="hidden" name="lang" value="en">
	<input type="hidden" name="subst" value="yes">
	<input type="submit" value="Order by credit/debit card" name="submit">
</form>

There are some changes that you need to make for this to work:

  1. The form needs to be given a name, if one is not present. This can be done by adding name=”worldpay” in the form element.
  2. We also need to have one custom variable defined in RBS World Pay system which will have the value of the cookies required, that can be accessed in Thank you page. Here, the defined custom variable is MC_gacookie. In this particular example, we also have one more defined custom variable MC_analytics which will have account id. This is required only when pages with different profile ids leads to same Thank you page.

With these changes, the above code of RBS world pay on product page will look like the following:

<form action="https://select.worldpay.com/wcc/transaction" method="post"> 
	<input name="cartId" type="hidden" value="Cart ID" />
	<input name="desc" type="hidden" value="Product Desc" />
	<input name="currency" type="hidden" value="GBP" />
	<input name="amount" type="hidden" value="XX.XX" />
	<input name="instId" type="hidden" value="”XXXXXX”" />
	<input name="lang" type="hidden" value="en" />
	<input name="subst" type="hidden" value="yes" />
	<input name="MC_analytics" type="hidden" value="XX-XXXXXX-X" />
	<input name="MC_gacookie" type="hidden" />
	<input name="submit" type="submit" value="Order by credit/debit card" />
</form>

Now, let us see what extra statements that we need to add to the normal GA tracking script on product page (or step: 1) that is generally placed at the end of the page.

The modified GA tracking script looks like the following:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
	var pageTracker = _gat._getTracker("UA-XXXXX-Y");
	pageTracker._setDomainName("none");
	pageTracker._setAllowLinker(true);
	pageTracker._setAllowHash(false);
	pageTracker._trackPageview();
	var save_url = pageTracker._getLinkerUrl("www.abc.com");
	var aPosition = save_url.indexOf("?");
	save_url = save_url.substring(aPosition + 1);
	worldpay.MC_gacookie.value = save_url;
} catch(err) {}
</script>

These additional statements are aimed to accomplish the task of saving all the required cookies as the value of the custom variable MC_gacookie that is created above.

Now, we need to store this value in a custom variable, MC_gacookie, which is specially created for this purpose. This value is accessed in the format <formname>.<variablename>.value and to this, we assign the value of required substring, save_url, obtained above. In the above example, formname is worldpay and variablename is MC_gacookie.

So by doing above, we have been able to pass the cookie values to a specific custom variable to be passed into worldpay without the need of javascript.

What is needed now is what to be done on page 3 (in worldpay’s language its called callback page). In This call back page (step: 3), we get all the variables through post methods. Just to remind that this page (or call back page or step 3) is generally a purchase completion page. Here we are changing to just have a button which says “click here to complete the transaction” button. This call back page resides on website’s server however it gets executed on worldpay.

Now this button needs to pass the values of Google analytics cookies that we had been able to pass it via a custom variable (in our example MC_gacookie) in worldpay. If you use PHP, you can use following code to get that custom variable and form a query string (don’t confuse this with GA custom variable- this is WP custom variable).

<?php $parameter = 'MC_gacookie';
if($_REQUEST[$parameter])
{
    $query="";
    //Get all existing parameters
    foreach($_REQUEST as $k => $v){
     if($k != $parameter) {
     $query=$query.$k."=".$v."&";
        }
        else
		{
        $query=$query.$v."&";
        }
    }
    $query=substr($query, 0, -1);
?>

Here $currentpage is the complete path of the thank you page. So, $currentpage can take value like http://yourwebsite.com/thankyou.html
Note: You will get a warning message when you click on the button above.
So what you have done till now is, you have passed the GA cookies till step 3 and have it as a query parameter when user clicks on the button.
The thank you page will now have the following GA e-commerce code.

<script>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

<script>
var pageTracker = _gat._getTracker("UA-XXXXXX-XX"); //This needs to be set if this value is different
pageTracker._setDomainName("none")
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
pageTracker._addTrans(
	"", // order ID - required
	"", // affiliation or store name
	"", // total - required
	"", // tax
	"", // shipping
	"", // city
	"", // state or province
	"" // country
);
pageTracker._addItem(
	"", // order ID - required
	"", // SKU code (stock keeping unit)
	">?=$_GET['item_name']?>", // product name
	"", // category or variation
	"", // unit price - required
	"" // quantity - required
);
pageTracker._trackTrans();
</script>

 

How to Refresh with Tatvic Google Analytics Excel Plugin

tatvic-google-analytics-excel-plugin-screen-refresh

While we had an overwhelming response to our Google Analytics Excel Plugin, we realized that it might be worth explaining in detail the core features of the plug-in.

So for this post, I have decided to explain how to use our auto-refresh feature using cell references from an Excel sheet. Below are the steps that users can take in order to update their dashboards automatically by changing input criteria. You would require to log in before you execute these steps.

1.       Insert required from and To dates in the excel sheet in two different cells as shown in the image below.

2.       Click on Excel Icon in the client next to the “From” date

3.       Select the cell where the “from” date is inserted(for example it is B3) & Click “OK”. In the example below, it is B3.

4.       Similar to #4 select the “To” date by clicking on the excel icon next to the “To” date

5.       Select the cell within excel where you have the “To” date provided. In the example below it is B4.

6.       Select required parameters like data granularity (breakdown by)

7.       Select the appropriate metrics & dimension that is required for analysis. In the example below, for the sake of simplicity, I have requested no. of visits by visitor type.

Once, the above request executes you will see the output as shown below.

The above table starting from cell D4 provides you visits by visitor type for the month of July-09.

Now if you need the same data for Aug-09 or for any other dates, you can just change the date in the excel sheet (aka B3 & B4) and click on refresh to get updated data in your excel sheet directly.

For .e.g.

As shown below once you change the dates in cells B3 & B4, and click on refresh, the Tatvic Google Analytics Plugin will automatically, extract the data from your Google Analytics account for the updated dates based on the value in cells B3 & B4. This will result in updated numbers for the visitor type table as shown below. Notice that in July, there were, 22,240 visits by new visitors vs. in August about 20,762 visits by new visitors!

Bot Icon
Bot Icon

Tatvic Bot

Explore About Tatvic and Services