Analytics
2.6K members online now
2.6K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How to generate E commerce tracking code and where to put in our site

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

How to generate E commerce tracking code and where to put in our website? And also what is the settings in GA panel?

Please help me.

Thanks

1 Expert replyverified_user

Re: How to generate E commerce tracking code and where to put in our site

Rising Star
# 2
Rising Star
Hello Jeff, hope you are doing great.

You will need to make changes to your current tracking code which you can find in your Google Analytics interface. There are different ways to set up ecommerce tracking, please reffer to this article for more detailled info:
https://support.google.com/analytics/answer/1009612?hl=en
Cheers, Alexey
UAWC Agency
Did you find any helpful responses or answers to your query ? If yes, please mark it as the ‘Best Answer.’

Re: How to generate E commerce tracking code and where to put in our site

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hello Alexey,

I have set it up but still getting following errors:
[Missing Ecommerce Data
Your site is configured for Ecommerce, but no data is flowing.]
1. Tag not fired through GTM.
2. Conversion Value should be prefixed with standard currency.
3. Code should be placed directly above the closing <body> tag.

I have mentioned below e-commerce tracking code as well:

<!-- Analytics transaction -->
&lt;script&gt;
dataLayer = [{
'transactionId': '20880', // Transaction ID - TypeSmiley Frustratedtring - Required
'transactionAffiliation': '0.01', // store name - TypeSmiley Frustratedtring - Optional to use
'transactionTotal': 0.01, //total revenue - Type:Numeric - Required
'transactionProducts': [{
'sku': 'CDS',
'name': 'Test Product ', // Product Name - TypeSmiley Frustratedtring - Required
'price': 0.01000, // Product Price - Type:Numeric - Required
'quantity': 1 // Product Quantity - Type:Numeric - Required
}]}];&lt;/script&gt;&lt;script type="text/javascript">
var _roi = _roi || [];

// Step 1: add base order details

_roi.push(['_setMerchantId', '485859']); // required
_roi.push(['_setOrderId', '20880']); // unique customer order ID
_roi.push(['_setOrderAmount', '0.01']); // order total without tax and shipping
_roi.push(['_addItem',
'CDS', // Merchant sku
'Test Product ', // Product name
'3296', // Category id
'Tennis Court Equipment', // Category name
'0.01000', // Unit price
'1' // Item quantity
]);
_roi.push(['_trackTrans']);
&lt;/script&gt;&lt;script type="text/javascript" src="https://stat.dealtime.com/ROI/ROI2.js">&lt;/script&gt;
<!-- Analytics transaction end -->

Re: How to generate E commerce tracking code and where to put in our site

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
hang on - after the 'closing body tag'? it does not go there

GA code universal version goes after the opening head tag:
"Paste your snippet (unaltered, in its entirety) into every web page you want to track. Paste it immediately before the closing </head> tag."
refer: https://support.google.com/analytics/answer/1008080?hl=en

if using GTM then that goes after opening body tag instead:
"Copy and paste the code snippet into your website. Paste this code so that it appears immediately after the opening <body> tag on every page on your site."
https://support.google.com/tagmanager/answer/6102821?rd=1

are you using GTM?
https://support.google.com/tagmanager/answer/6103696#AddingTheContainerSnippet
maybe the position of the code is your issue?
let us know either way.

Re: How to generate E commerce tracking code and where to put in our site

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hello David,

 

I have checked all our script as per your comments but still same and getting following error:

Missing Ecommerce Data

View www.unique-sports.com is configured for Ecommerce, but no recent transaction data is being received. Your site may not be tagged for Ecommerce.

For your reference, Please check this script file (Transaction completion page) where I have implemented all google code. https://app.box.com/s/m4pvtzjhna92ve18gicukvtxjjhail1i

Let me know your feedback.

Thanks

Re: How to generate E commerce tracking code and where to put in our site

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆
True ok, now i have the URL i am seeing this in tag assistant:
"Tag not fired through GTM" but also that you do have GTM and it contains adwords conversion tracking code (remarketing) and GA
but it is saying that 'not firing through GTM' error...

these are the reasons that you get that particular error message:
Why is a tag not firing?

In all cases, remember that Preview Mode is available to help troubleshoot your tag firing problems.
Here are some possible causes for tag firing problems:

Unpublished changes: Make sure that you have published your container with the tag changes in question, and that your trigger is formed properly to allow it to fire on the page you are testing. Note that it can take a few seconds for the container to publish, and that you should do a hard refresh of the page or clear your web browser's cache to see the changes.
Wrong trigger configuration: You might have set up a trigger expecting it to fire your tag, only to find the trigger is not firing based on the expected criteria. Double check that the conditions you are targeting are indeed present for the expected trigger behaviors.
Triggers too specific: Check that your trigger isn't unnecessarily specific. For example, if you define a URL based trigger and begin the URL with "http://www.example.com", the tag will not fire for URLs "https://www.example.com" (using "https") and "http://example.com" (without the "www").
Unexpected site or app changes: If your website or app code changes, it is possible that your triggers might no longer work. This is especially common for web page triggers that depend on elements being present, such as HTML IDs and class attributes. A best practice to help avoid this problem is to leverage a data layer.
Too many HTTP requests: Google Tag Manager can only fire tags within the capabilities of the browser. Most browsers will not open more than six to eight HTTP requests to a single domain at a time. If you have a high number of tags on the same domain firing under the same conditions, tags will only fire within this browser limitation.
Container snippet problems: It's possible that you have installed the Google Tag Manager container snippet incorrectly on your site. Use Tag Assistant to help verify installation. Often if this is the problem, the best solution is to simply reinstall the snippet.
https://support.google.com/tagmanager/answer/6103683


Re: How to generate E commerce tracking code and where to put in our site

Rising Star
# 7
Rising Star

Dear @Jeff K your data layer code is a bit different from example described in official google documentation.

 

You need to work in your CMS or ecommerce platform first so it will render the page template and enrich datalayer with details about the ecommerce event in needed format. For sure you need assistance of your web developer on this task. 

 

Please make sure that your datalayer is placed before GTM code and you have all required  variables such as transactionId, name, sku etc. (transactionId and sku need to be unique). 

Cheers, Alexey
UAWC Agency
Did you find any helpful responses or answers to your query ? If yes, please mark it as the ‘Best Answer.’

Re: How to generate E commerce tracking code and where to put in our site

[ Edited ]
Rising Star
# 8
Rising Star

Also I can see that your GA code is not firing, it might happend due to the following reasons (David shared it with your). 

Cheers, Alexey
UAWC Agency
Did you find any helpful responses or answers to your query ? If yes, please mark it as the ‘Best Answer.’