Setup Ecommerce Tracking for Donation Form using Google Tag Manager

Standard

Set up eCommerce Tracking tracking for The Donation/Charity Form using Google Tag Manager

Recently once client ask me they want track ecommerce tracking donation form and charity form based ecommerce tracking using Google Tag Manager, Once I looked this website , I asked I want  to make a test order  to see based on that I will make require to tags and trigger to see ecommerce tracking in Google Analytic using Google Tag Manager without touching code of Donation Form.

Challenge here to track ecommerce for Donation/Charity form using Google Tag Manager 

  1. Order id is not showing most of donation form website 
  2. Most time does not redirect to another page and showing message on pop up 
  3. Require to identify quantity and Product Name 
  4. Make trigger on Success message and Success Page for eCommerce Tracking using Google Tag Manager
Donation Form for Ecommerce Tracking

Integrate Google Analytics Ecommerce Tracking for Your Donation Form Page

To Implement Ecommerce for Donate/Charity Form using Google Tag Manager using Custom Javascript with touching code

1. First Install Google Tag Manager on Your Donation/Charity Form for Set Up Ecommerce using Google Tag Manager

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

2. It’s time to verify Google Analytic eCommerce Tracking tracking for The Donation/Charity Form using Google Tag Manager

Warning:if you do n’t know about javascript or don’t have developing knowledge then do n’t try to Set up eCommerce Tracking tracking for The Donation/Charity Form using Google Tag Manager a custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Implementation of the Emarsys Data Collection using Google Tag Manager

Standard

Setup of Creating the Emarsys Tag Data Collection using Google Tag Manager without Touching Code

Recently once of client ask to me implement Emarsys Tag Data Collection using Google Tag Manager. Once I looked Emarsys Tag Data Collection, basically these tags are working enhanced ecommerce tracking, if you already implemented enhanced ecommerce tracking either datalayer or custom javascript that will more easier to implement Emarsys Tag Data Collection!! 

First you need understand to requirement of Emarsys Tag Data Collection using Google Tag Manager without touching code 

  1. ecommerce – Include all the details product details, cart details , Checkout and purchase details using Google Tag Manager without touching code Website
  2. Category path – Category of Website page, it will be trigger way to browser category 
  3. Cart content – Cart details included through Google Tag Manager for Emarsys Data Collection
Emarsys Data Collection using Google Tag Manager

Implementing Emarsys Tag Data Collection using Google Tag Manager Scripts – Emarsys

1. Install Google Tag Manager on the website for Emarsys Data Collection 

Paste this code as high in the <head> of the page as possible:

<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

 

<script type=”text/javascript”>;
var ecom = {{ecommerce}};
var pagecat = {{Page Category}};
var cartcontent = {{Cart Content}};

var ScarabQueue = ScarabQueue || [];

(function(id) {
if (document.getElementById(id)) return;
var js = document.createElement(‘script’); js.id = id;
js.src = ‘//cdn.scarabresearch.com/js/MERCHANT_ID/scarab-v2.js’;
var fs = document.getElementsByTagName(‘script’)[0];
fs.parentNode.insertBefore(js, fs);
})(‘scarab-js-api’);

ScarabQueue.push( [‘setEmail’, {{User Email}} ] );

if ( ecom && ecom.detail ) {
ScarabQueue.push( [‘view’, ecom.detail.products[0].id ] );
}

if ( pagecat && ( “undefined” != typeof pagecat ) && ( “” != pagecat ) ) {
ScarabQueue.push( [‘category’, pagecat ] );
}

if ( “object” == typeof cartcontent ) {
ScarabQueue.push( [‘cart’, cartcontent ] );
}

if ( ecom && ecom.purchase ) {
var emarsys_purchase_command = {
“orderId”: ecom.purchase.actionField.id,
“items”: []
}

for ( var i=0; i<ecom.purchase.products.length; i++ ) {
emarsys_purchase_command.items.push({
“item”: ecom.purchase.products[ i ].id,
“quantity”: ecom.purchase.products[ i ].quantity,
“price”: ecom.purchase.products[ i ].price,
});
}

ScarabQueue.push( [‘purchase’, emarsys_purchase_command ] );
}

ScarabQueue.push( [‘go’] );
</script>

2. It’s time to verify Emarsys Data Collection using Google Tag Manager

Written a separate datalayer each steps now you can see datalayer on “{{ecommerce}}” , You will see ecommerce data layer variable on product page , Add to cart button, Cart Pages and Success

 

 Tags The Emarsys JavaScript

Implementation of the Emarsys Data Collection using Google Tag Manager Tags

Warning:if you do n’t know about javascript or don’t have developing knowledge then do n’t try to Google Tag Manager (GTM) with Implementation of the Emarsys Data Collection using Google Tag Manager a custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Google Analytics ecommerce Tracking for RMS Hotel Booking Engine

Standard

Google Analytics Enhanced eCommerce and eCommerce Tracking for RMS Hotel Booking Engine using Google Tag Manager

Recently One of client ask me to implement e-commerce tracking on RMS Booking Engine using Google Tag Manager, one I looked online RMS  Hotel website and found they are using RMS Hotel Booking E-commerce Tracking using Google Tag Manager!

Enhanced eCommerce and eCommerce tracking for Hotel Websites for RMS Online Hotel Reservation without Touch Booking Engine using Google Tag Manager

Enhanced eCommerce Tracking for RMS

1. Install Google Tag Manager on Your online Hotel Website and RMS Hotel Booking Engine  for Set Up Enhanced eCommerce a using Google Tag Manager without touch code of sites and Booking Engine for RMS Hotel Reservation Systems

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

2. Setup Cross-domain tracking to Share cookie information between Hotel website and RMS  Hotel booking engine using Google Tag Manager without code of Hotel website and Booking engine  for RMS Online Hotel Reservation Systems

Tracking eCommerce on Hotel Booking system

Track eCommerce data from External RMS Hotel Booking Engine

It’s time to verify eCommerce tracking for RMS Hotel Booking Engine using Google Tag Manager in Google Analytic

External eCommerce on RMS Hotel Booking Engine

eCommerce data from External RMS Hotel Booking Engine usging Google Tag Manager

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to RMS Hotel Booking Engine Ecommerce Tracking using Google Tag Manager a custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Shopify Plus Ecommerce and Enhanced Ecommerce using Google Tag Manager

Standard

Shopify & Shopify Plus Ecommerce and Enhanced Ecommerce using Google Tag Manager without putting any data layer code on Shopify used only Custom Javascript 

Recently, one of the client asked me Implement eCommerce and Enhanced eCommerce tracking using Google Tag Manager without putting the code on Shopify plus! One look Shopify plus a found a way of entire tracking ecommerce and enhanced ecommerce tracking!

To Implement Shopify Plus and Shopify Enhanced Ecommerce using Google Tag Manager & Shopify Plus using Custom Javascript with touching code

Shopify Enhanced Ecommerce using Google Tag Manager

Shopify eCommerce and Enhanced eCommerce using Google Tag Manager

First Install Google Tag Manager on Your Shopify for Set Up Ecommerce and Enhanced Tracking using Google Tag Manager

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

  1. Product Detail Impressions: To Track product impression for Shopify Plus and Shopify Enhanced Ecommerce Tracking using Google Tag Manager used custom javascript to get the value of price, product and brand etc
shopify google analytics enhanced ecommerce

Measuring Product Impressions Enhanced Ecommerce on Shopify

2.  Add to Cart: To measure additions add to Cart Product added for Shopify and Shopify Plus Enhanced Ecommerce Tracking using Google Tag Manager used custom javascript to get the value of price, product and brand etc

Google Analytics Enhanced Ecommerce in Shopify

Shopify Ecommerce Integration using Google Tag Manager

3.  Measuring Checkout Steps: To measure Checkout Steps that will tell us , How many people reach to till checkout and drop out and went till another step for Ecommerce and Enhanced Ecommerce tracking in Shopify and Shopify Plus using Google Tag Manager

shopify Enhanced eCommerce checkout using Google Tag Manager

Google Tag Manager Shopify checkout eCommerce and Enhanced eCommerce

4.  Measuring Purchases: To track purchases details in Google Analytic using Custom Javascript and Micros Shopify Plus Ecommerce and Enhanced Ecommerce using Google Tag Manager

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to Shopify and Shopify Plus Enhanced Ecommerce Tracking using Google Tag Manager a custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Ecommerce Tracking for SynXis Online Hotel Reservation Systems using Google Tag Manager

Standard

Ecommerce Tracking for SynXis Online Hotel Reservation using Googel Tag Manager without touch Booking Engine System

Recently one client ask me to implement ecommerce tracking for his hotel booking engine, once  i reviewed and notice, they are using SynXis Online Hotel Reservation, they said, they want implement e-commerce tracking using Google Tag Manager without touching his booking engine!

eCommerce tracking for Hotel Websites for SynXis Online Hotel Reservation without Touch Booking Engine 

eCommerce tracking for Hotel

eCommerce tracking for SynXis Online Hotel Reservation using Google Tag Manager

1. Install Google Tag Manager on Your Hotel Website and Booking Engine  for Set Up Ecommerce a using Google Tag Manager without touch code of sites and Booking Engine for SynXis Online Hotel Reservation Systems

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

2. Setup Cross-domain tracking to Share cookie information between website and booking engine using Google Tag Manager without code of Hotel website and Booking engine  for SynXis Online Hotel Reservation Systems

Advanced Analytics Ecommerce tracking for Hotels

Ecommerce Tracking Conversions For Hotel

It’s time to verify eCommerce tracking for SynXis Online Hotel Reservation Systems using Google Tag Manager in Google Analytic

Ecommerce Tracking for SynXis Online Hotel Reservation Systems

Ecommerce Tracking for SynXis Online Hotel Reservation with full Product Information

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to SynXis Online Hotel Reservation Systems Ecommerce Tracking using Google Tag Manager a custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Ecommerce Tracking for Cratejoy platform using Google Tag Manager

Standard

Setup Google Analytics Ecommerce Tracking On Your Storefront Cratejoy platform using Google Tag Manager without touch website code 

Recently one client ask me to implement ecommerce tracking on Cratejoy platform using Google Tag Manager! Once I looked cratejoy plaform coding build in asp.net, after that I asked to client I need to place a test order on the Cratejoy website to see possible to ecommerce tracking for (asp.net) Cratejoy platform using Google tag manager without touch website code! , I said ready to implement ecommerce trackign on Cratejoy using Google Tag Manager!

Ecommerce Tracking On Cratejoy platform (asp.net) using Google Tag Manager

Ecommerce Tracking for Cratejoy platform

First Install Google Tag Manager on Cratejoy platform  Ecommerce Tracking on  Putting code <head> and <body> ecommerce tracking without touching Code

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

Written Custom E-commerce Tracking for Cratejoy platform using Help of Custom HTML on Google Tag Manager on Drupal with Custom Javascript for E-commerce/eCommerce Tracking

Google Analytics E-commerce Tracking for ASP.NET

Product Array Ecommerce Tracking for Cratejoy platform

Ecommerce Tracking for Cratejoy

Ecommerce Tracking for Cratejoy platform using Google Tag Manager without touching Code

Now it’s time to verify Ecommerce Tracking for Cratejoy platform in Google Analytic using Google Tag Manager without touching Code!

Warning:if you do n’t know about javascript/ Datalayer/Jquery or do n’t have developing knowledge then do n’t try Ecommerce Tracking for Cratejoy platform Google Tag Manager Ecommerce Tracking without touching Codea custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Ecommerce Tracking for geckobooking.dk using Google Tag Manager

Standard

Google Analytics Ecommerce Tracking on geckobooking.dk (gecko) using Google Tag Manager

Recently one of client asks me to implemented ecommerce tracking on geckobooking using Google Tag Manager, I ask to client share your website, once I look his website and found it, geckobooking is working through Iframe as third party booking engine to track e-commerce tracking!

 Ecommerce Tracking on geckobooking.dk

3rd party ecommerce tracking using Google Tag Manager

Once I looked website Online booking engine (geckobooking) form working inside iframe as 3rd party Online booking engine form, once I started looking possible to track e-commmerce tracking for geckobooking using Google Tag Manager!

As you know 3rd party iframe Online booking engine form a challenging to track ecommerce tracking using Google Analytic/Google Tag Manager! But I started investigate to implement ecommerce tracking on geckobooking using Google Tag Manager!

Ecommerce Tracking for geckobooking using Google Tag Manager

Ecommerce Tracking for geckobooking

First Install Google Tag Manager on geckobooking 2 Google Tag Manager Ecommerce Tracking on  Putting code <head> and <body>

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

geckobooking ecommerce tracking

geckobooking ecommerce tracking

Now it’s time to verify geckobooking ecommerce tracking in Google Analytic using Google Tag Manager

geckobooking ecommerce tracking using Google Tag Manager

Warning:if you do n’t know about javascript/ Datalayer/Jquery or do n’t have developing knowledge then do n’t try geckobooking Ecommerce Google Tag Manager Ecommerce Tracking without touching Codea custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

Magento 2 Google Analytics Ecommerce Tracking Using Google Tag Manager

Standard

                     Magento 2 Ecommerce and Enhanced Ecommerce (UA) Tracking using Google Analytic and Google Tag Manager

Recently once client asks me to implement e-commerce/enhanced Ecommerce tracking in Magneto 2 using Google Tag Manager! Way Magento 2 coding is different from Magento 1.1 – 1.9 . once I looked on Magento 2 , I said it’s possible both with google tag manager and putting datalayer on Magento 2 or Without touch code Magento 2 Also possible E-commerce tracking using Google Tag Manager!

When you will write e-commerce/ecommerce tracking for Magneto 2 , quite different from Magento to other version Mangento 1.1 -1.9. 

When you are write code Mangento 2 e-commerce make sure you are aware coding knowledge of Mangento other you will broke website!

Magento 2 Ecommerce & Enhanced Ecommerce Tracking using Google Tag Manager

Magento 2 Google Analytics Ecommerce

Magento 2 Google Analytics Ecommerce & Enhanced Ecommerce Tracking

First Install Google Tag Manager on Manento 2 Google Tag Manager Ecommerce Tracking on  Putting code <head> and <body>

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

Written Php Code to get the value of product Array, total order value, Shipping value , Tax value and Order number on Magento 2 E-commerce/eCommerce Tracking using Data Layer on the website  

Written custom for Magento 2 E-commerce tracking using Google Tag Manager

<script type=”text/javascript”>
//<![CDATA[
window.dataLayer = window.dataLayer || [];
<?php >
dataLayer.push({
‘ecommerce’: {
‘purchase’: {
‘actionField’: {
‘id’: ‘<?php echo $order->getIncrementId()?>’, // Transaction ID. Required for purchases and refunds.
‘affiliation’: ‘test’,
‘revenue’: ‘<?php echo $orderTotal?>’, // Total transaction value (incl. tax and shipping)
‘tax’: ‘<?php echo $Tax?>’,

Now it’s time to verify result in Google Analytic tracking Implemented on Magento 2 E-commerce tracking 

Magento 2 Google Analytics Ecommerce

Magento 2 Google Analytics Enhanced Ecommerce

Warning:if you do n’t know about javascript/ Datalayer/Jquery or do n’t have developing knowledge then do n’t try Magento 2 Google Tag Manager Ecommerce Tracking without touching Codea custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

osCommerce Google Analytics ecommerce tracking with Global Site Tag (gtag.js)

Standard

Google Analytics Ecommerce Tracking in Oscommerce (osCommerce eCommerce Tracking)

Ecommerce /E-commerce Tracking in Oscommerce using Google Tag Manager/Google Analytic

Recently one of client asked me to implement to e-commerce tracking on osCommerce with Global Site Tag (gtag.js). Because google recently updated Google Analytic Code with Global Site Tag (gtag.js), Not most people familiar with Global Site Tags (gtag.js) and How to implement E-commerce tracking with Global Site Tag (gtag.js).

osCommerce eCommerce Tracking with with Global Site Tag (gtag.js)

Because recently of Google Analytic universal tags to Global Site Tag ‘gtag.js’, way of write osCommerce eCommerce Tracking with gtag.js changes – So here below Updated E-commerce Tracking forGlobal Site Tag (gtag.js)!

osCommerce Track purchases with Global Site Tag (gtag.js) E-commerce Tracking

Google Analytic E-commerce tracking in osCommerce

Google Analytic eCommerce Tracking with osCommerc (gtag.js)

To track a  Google Analytic osCommerce transaction, send a purchase event with the items in the transaction

<script>
gtag('event', 'purchase', {
  "transaction_id": "Order Number or Id ",
  "affiliation": "Store Name",
  "value": Total Amount,
  "currency": "USD",
  "tax": tax,
  "shipping": shipping,
  "items": [
    {
      "id": "Product SKU",
      "name": "Product Name",
      "category": "Product Category",
      "quantity": No of quantity,
      "price": 'Product Price'
    }]
});
</script>

First Install Google Analytic (Global Site Tag (gtag.js) on osCommerce on <HEAD> Tag

<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=UA-XXXXXX-X”></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());

gtag(‘config’, ‘UA-XXXXXX-X’);
</script>

Written above code sample E-commerce tracking then you need to modify with Custom PHP that will work on E-commerce tracking for osCommerce

You need modify given above given code you can see it need modify like that~

<script>
gtag(‘event’, ‘purchase’, {
  “transaction_id”: “<?php echo $order[‘order’]; ?>’”,
  “affiliation”: “test”,
  “value”: <?php echo format_raw($totals[‘value’], DEFAULT_CURRENCY); ?>,

Now it’s time to verify result in Google Analytic 

osCommerce eCommerce Tracking

Warning:if you do n’t know about javascript/ Datalayer/Jquery or do n’t have developing knowledge then do n’t try osCommerce Google Analytic/Google Tag Manager Ecommerce Tracking without touching Codea custom javascript without using Any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

E-Commerce Tracking for Adobe Business Catalyst

Standard

Recently so many clients ask me to implement “E-Commerce Tracking for Adobe Business Catalyst” using Google Analytic and Google Tag Manager. Clients ask me a few questions before implementing, they said, they read on some blog and article, They said product details not possible on Adobe Business Catalyst and even said on official plugin also written on, I said do not worry, Already implement so many clients for E-Commerce Tracking for Adobe Business Catalyst include all the details of the product.

Full Product Detail with E-Commerce Tracking for Adobe Business Catalyst using Google Analytic/Google Tag Manager

Most of people does not want to try their Hand or modify tracking work with full details of E-commerce Tracking for Adobe Business Catalyst. I have modified tracking to work for Full E-commerce tracking with Product Details 

E-Commerce Tracking for Adobe Business Catalyst


1. Put this Code on the Website on after Opening <head> with Cross Domain tracking!

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-XXXXX-Y', 'auto', {'allowLinker': true});
    ga('require', 'linker');
    ga('linker:autoLink', ['worldsecuresystems.com', 'yoursitename.com'],false,true);
    ga('send', 'pageview');
</script>

Note:  Make sure you will change it with your Google Analytic UA ID ‘UA-XXXX-Y’

2. To Set Up e-commerce tracking on Adobe Business Catalyst, You need to put code on Success page, it’s call on Adobe Business Catalyst to Receipt – Buy

Site Manager —–> Module Templates ——–> Online Shop Layouts ————> Receipt ———–>Buy

————————————-Need to modify below to code to get proper details of e-commerce tracking with Product Details ———- 

‘id’: “{{ prod.productId }}”, // Transaction ID. Required

  ‘name’: “{{ prod.product.name }}”, // Product name. Required

  ‘sku’: “{{ prod.product.productCode }}”, // SKU/code

  ‘category’: “{{ catalog.name }}”, // Category or variation

  ‘price’: “{{ prod.totalPrice }}”, // Unit price

  ‘quantity’: ‘{{ prod.units }}’ // Quantity

});        

Now it’s time to verify E-commerce Tracking for Adobe business Catalyst  using Google Tag Manager and Google Analytic 

Ecommerce Tracking with Google Analytics

Warning: If you do n’t know about javascript or don’t have developing knowledge then do n’t try to implement on E-Commerce Tracking for Adobe Business Catalyst using Google Tag Manager / Google Analytic that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com