I have installed the plugin but where is th option to say send coupon code also. Wher is the option in configure page to track coupon code also. Data layer push on even purchase is only sending id, affiliation, revenue and shipping
This is a test website I created. http://shoponlinecompare.com using nopcommerce.
I installed plugin Google Tag Manager Enhanced Ecommerce by FoxNetSoft.GoogleEnhancedEcommerce
Added merchant id also in plugin configure page. It is sending data to google analytics, but not sending coupon code.
Try using coupon HAPPY50 Now the google tag manager data layer push is not sending details of coupon. It is only sending id, affiliation, revenue and shipping.
<script> // Send transaction data with a pageview if available // when the page loads. Otherwise, use an event when the transaction // data becomes available. dataLayer.push({ 'ecommerce': { 'purchase': { 'actionField': { 'id': 'T12345', // Transaction ID. Required for purchases and refunds. 'affiliation': 'Online Store', 'revenue': '35.43', // Total transaction value (incl. tax and shipping) 'tax':'4.90', 'shipping': '5.99', 'coupon': 'SUMMER_SALE' }, 'products': [{ // List of productFieldObjects. 'name': 'Triblend Android T-Shirt', // Name or ID is required. 'id': '12345', 'price': '15.25', 'brand': 'Google', 'category': 'Apparel', 'variant': 'Gray', 'quantity': 1, 'coupon': '' // Optional fields may be omitted or set to empty string. }, { 'name': 'Donut Friday Scented T-Shirt', 'id': '67890', 'price': '33.75', 'brand': 'Google', 'category': 'Apparel', 'variant': 'Black', 'quantity': 1 }] } } }); </script>
In referene to my post above, in google developer documentation page - https://developers.google.com/tag-manager/enhanced-ecommerce check under measuring Purchases.
Measuring Purchases Ecommerce Measurement: purchase Accepts Data: id (Transaction ID), array of productFieldObjects Push your transaction details into the Data Layer using the purchase action, along with an event that will fire an enhanced ecommerce-enabled tag. In this example, the transaction details are known at the time the page loads, and will be sent with a pageview when the gtm.js script returns:
<script> // Send transaction data with a pageview if available // when the page loads. Otherwise, use an event when the transaction // data becomes available. dataLayer.push({ 'ecommerce': { 'purchase': { 'actionField': { 'id': 'T12345', // Transaction ID. Required for purchases and refunds. 'affiliation': 'Online Store', 'revenue': '35.43', // Total transaction value (incl. tax and shipping) 'tax':'4.90', 'shipping': '5.99', 'coupon': 'SUMMER_SALE' },