Universal Analytics Tracking code for Measuring Addition/Removal from Cart via GTM
-
Hello Experts,
Can you please tell me Universal Analytics Tracking code for Measuring Addition/Removal from Cart via GTM?
Any one tell me process and code?
Thanks!
-
Can anyone give me specific answer that i have done all the process and now i just want to know the firing rule in google tag manager for Addition/Removal from Cart?
-
You may be best understanding Google Tag Manager first https://developers.google.com/tag-manager/ then Adding Data Layers https://developers.google.com/tag-manager/devguide
-
You mean given below code i have to add on all add to cart page ? Rest in google tag manager what type of configuration i have to do? i mean what will be track type ? and what will be rule? anything else u suggest?
// Measure the removal of a product from a shopping cart. dataLayer.push({ 'event':'removeFromCart', 'ecommerce':{ 'remove':{ // 'remove' actionFieldObject measures. 'products':[{ // removing a product to a shopping cart. 'name':'Triblend Android T-Shirt', 'id':'12345', 'price':'15.25', 'brand':'Google', 'category':'Apparel', 'variant':'Gray', 'quantity':1 }] } } });
Thanks
-
Hi,
The code examples are here https://developers.google.com/tag-manager/enhanced-ecommerce along with explanations. How to integrate would depend on the shopping platform that you are using.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google Analytics Not Properly Attributing Goals
My GA has been working fine for years and is now suddenly attributing 100% of my goals/conversions to a "referral" source. In this case "crm.zoho.com". (see attached url) Our contact form is a zoho CRM form. When prospect fills it out online, it dumps them to a thank-you page and the conversion is counted. That all works just fine, but it is not attributing the conversion to Organic or PPC or Direct as it was a month or so ago. I'm not sure if this may be the cause, but I was cleaning up GA about a month ago, deleting some filters I didn't think I needed any more. Thank you for your help. 9CRUx
Reporting & Analytics | | sanctuary2420 -
Would updating Meta Titles affect Google analytics tracking?
Hi All, I need a little bit of help. We need to optimize our blog's articles Meta titles for SEO which all exceed 100 characters. I was told that if we change the titles, google analytics would split the tracking pages and count the data as 2 pages (old title and new title). Has any of you have this experience before and if so, is there a way to avoid google analytics counting this as two pages? Thanks in advance! Viviana http://analyteguru.com/ http://analyteguru.com/ http://analyteguru.com/
Reporting & Analytics | | mchoi0 -
How to use remarketing using GTM?
Hello Everybody, Can you please tell me how to use remarketing using GTM? I have read lots of post but confused with Google Analytic, adwords, merchant, tag manager, codes...etc. So can any one explain me properly? Regards, BK Mitesh
Reporting & Analytics | | bkmitesh0 -
Offline conversions not as e-commerce transactions in universal analytics
I am working on a project to measure offline conversions with the new Universal Analytics from Google. When a lead gets the status "order" in my custom made lead management system, we sent the earlier grabbed Google client ID with the code below to Universal Analytics. The upload is working, although Analytics reports the conversion as an e-commerce transaction. I think the conversion must be uploaded as a analytics goal / event but I don't know what we can add to the code to let Analytics report it that way. Does anyone know how I can modify the code or Analytics settings to make sure that Google Analytics does not report it as eCommerce transaction? My code for uploading the Google Client ID to Analytics: <code>$ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, 'http://www.google-analytics.com/collect'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727)"); curl_setopt($ch, CURLOPT_POSTFIELDS, "v=1&tid=UA-XXXXXXXX-42&cid=379445656".urlencode('.')."1380816256&t=transaction&tr=123.00&ti=43388&z=".time()); curl_close ($ch);</code>
Reporting & Analytics | | timvermeulen6390 -
Are RSS fees tracked by Google Analytics?
In both the new GA and former version, how are RSS feeds handled by Google Analytics. If not, is there an easy means by which to account for this traffic, in order to have a better picture of traffic. Thanks. Alan
Reporting & Analytics | | ahw0 -
Setting up Google Analytics default URL
If someone has set: the default url in Google Analytics to a non-www address (http://mysite.com) then placed the UA tracking script from that GA account within the CMS framework of the website... ... and then set the permanent 301 redirect in the htaccess file to redirect to the www address (http://www.mysite.com). How less accurrate will my GA analytics measurements be considering the default url within GA is non-www and the permanent 301 redirect in htacess is to the www-address? Anyone know how reliable GA reports are until the default url in GA analytics is changed to match what is the redirected url in htaccess file? _Cindy
Reporting & Analytics | | CeCeBar0 -
Tracking pdf downloads
hello, I have a site with 100's of pdf's for download and I would like to track how many people are downloading these, does anyone have a simple solution for this? Is there anyway I can do this in Google Analytics using one piece of code, thanks...
Reporting & Analytics | | Socialdude0 -
Tracking Effects of Internal Linking
Can anyone suggest the best way to track the effectiveness of internal linking on a website? Thanks!
Reporting & Analytics | | RishadShaikh590