Implement Criteo OneTag via Google Tag Manager for Drupal

Standard

Setup Crieto OneTag for Drupal using Google Tag Manager without touching Code of Drupal 

Recently once client ask me to implement Criteo OneTag via Google Tag Manager without touch Code of Drupal, I asked client run a test order to see possibility via Google Tag Manager for Crieto OneTag for Drupal. I placed a test order on Drupal for Criteo OneTag after placed test order all the possibility to setup without touching code of Drupal using Google Tag Manager for Drupal.

Require these Tags need to Implement Criteo OneTag on BigCommerce Stencil Themes to Work using Google Tag Manager

  1. Homepage dataLayer using Google Tag Manger for Crieto OneTag for Drupal
  2. Listing page dataLayer using Google Tag Manager for Crieto OneTag for Drupal
  3. Product page dataLayer using Google Tag Manager for Crieto OneTag for Drupal
  4. Basket page dataLayer using Google Tag Manager for Crieto OneTag for Drupal
  5. Sales Confirmation page dataLayer using Google Tag Manager for Crieto OneTag for Drupal

1. Install Google Tag Manager via Google Tag Manager on Implement Criteo OneTag via Google Tag Manager for Drupal

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

Drupal Ecommerce Tracking in Google Analytic

Standard

Google Analytics Enhanced Ecommerce for Drupal using Googel Tag Manager

Are you looking Drupal Ecommerce and Enhanced Ecommmerce Tracking using Google Tag Manager to sales details in Google Analytic

Recently one client ask me to implement drupal ecommerce tracking using Google Tag Manager to push all the purchase information to track in Google Analytic. once I looked possible track ecommerce tracking for Drupal, I need put transaction details into the Data Layer on success/Order Confirmation Page!, I have written a data layer on success page to push ecommerce tracking datalayer in Google Analytic to see sales detail in Google Analytic.

Google Analytics Enhanced Ecommerce for Drupal

Implementing Analytics eCommerce tracking in Drupal

First Install Google Tag Manager on Drupal Google Ecommerce Tracking for Google Tag Manager Ecommerce Tracking on  Putting code For Drupal  <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

Product Detail Impressions: To Track product impression for Drupal Enhanced Ecommerce Tracking using Google Tag Manager used custom javascript to get the value of price, product and brand etc

Data layer Measuring Views of Product Details for Drupal

Implement Google Analytic Tracking Through Google Tag Manager on Drupal

Written a data layer code to push Ecommerce tracking for Drupal Ecommerce tracking in Google Analytic using Google Tag Manager

dataLayer.push({
‘event’: ‘orderComplete’,
‘transactionId’: “<%= order.number %>”,
‘transactionTotal’: <%= order.total.to_f %>,
‘transactionTax’: <%= order.tax_total.to_f %>,

Now it’s time to verify result in Google Analytic E-commerce tracking in Drupal using Google Tag Manager

Drupal Ecommerce Tracking in Google Analytic

Implemented Analytics eCommerce tracking in Drupal

Warning:if you do n’t know about javascript/ Datalayer/Jquery or do n’t have developing knowledge then do n’t try Drupal Ecommerce Tracking using Google Tag Manager 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

Drupal Ecommerce Tracking for Google Analytics using Google Tag Manager

Standard

Implementing Enhanced Ecommerce Tracking using Google Tag Manager for Drupal

Recently, one of client asks me to track e-commerce /commerce tracking in Drupal using Google Tag Manager. Because Client wants to see revenue from where it’s generated in store. Does not want to provide access of the website and said I will provide access of Google Analytic and Google Tag Manager, he said implement e-commerce tracking using Custom Javascript using Google Tag Manager.

Once I walk through his Drupal website and make a test order to see possible for E-commerce / Enhanced Tracking with Google Tag Manager using Custom Javascript in Drupal

What Challenges for Enhanced Ecommerce/eCommerce Tracking on Drupal using Google Tag Manager with Custom Javascript

  1. Written a custom javascript to get product array, order id, shipping , tax and other details to work  using Custom Javascript on Drupal

First Install Google Tag Manager on Drupal Google Tag Manager Ecommerce Tracking with Custom Javascript 

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 Code using Help of Custom HTML on Google Tag Manager on Drupal with Custom Javascript for E-commerce/eCommerce Tracking

Drupal Ecommerce Tracking using Google Tag Manager

Drupal Google Tag Manager E-commerce using Custom Javascript

Written Custom E-commerce Tracking Code using Help of Custom HTML on Google Tag Manager For Drupal with custom javascript  Code/ Data Layer on the website for E-commerce/eCommerce Tracking  and Verified with Google Analytic 

Drupal Ecommerce Tracking

Drupal Ecommerce Tracking for Google Analytics 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 Drupal Google Tag Manager Ecommerce Tracking with 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