Subversion Repositories SmartDukaan

Rev

Rev 10095 | Rev 12541 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10095 Rev 12530
Line 205... Line 205...
205
	
205
	
206
    <script type="text/javascript" charset="utf-8">
206
    <script type="text/javascript" charset="utf-8">
207
	#set($order = $action.getRechargeOrder())
207
	#set($order = $action.getRechargeOrder())
208
	
208
	
209
	#if($order.getStatus().name()=="RECHARGE_SUCCESSFUL")
209
	#if($order.getStatus().name()=="RECHARGE_SUCCESSFUL")
210
	var _gaq = _gaq || [];
-
 
211
	  _gaq.push(['_setAccount', '${in.shop2020.gaAccountID}']);
-
 
212
      _gaq.push(['_trackPageview']);
-
 
213
	  
-
 
214
	  if(typeof _gaq != "undefined" && _gaq != null)  {
-
 
215
        _gaq.push(['_addTrans',
210
		  ga('ecommerce:addTransaction', {
216
           '$order.getDisplayId()',                // order ID - required
211
	          'id': '$order.getDisplayId()',                // order ID - required
217
           '${in.shop2020.title}',                       // affiliation or store name
212
	          'affiliation': '${in.shop2020.title}',                       // affiliation or store name
218
           '$order.getTotalAmount()',      // total - required
213
	          'revenue': '$order.getTotalAmount()',      // total - required
219
           '0',                             // tax
-
 
220
           '0',                             // shipping
214
	          'shipping': '0',                  // Shipping
221
           '',     // city
-
 
222
           '',    // state or province
-
 
223
           'INDIA'                          // country
215
	          'tax': '0'                     // Tax
224
        ]);
216
	        });
225
 
-
 
226
        var prod_name = '';
217
	        // addItem should be called for every item in the shopping cart.
227
        _gaq.push(['_addItem',
218
	        ga('ecommerce:addItem', {
228
            '$order.getDisplayId()',            // order ID - required
219
	          'id': '$order.getDisplayId()',            // order ID - required
229
            '$order.getDeviceNumber()',    // SKU/code - required
220
	          'sku': '$order.getDeviceNumber()',    // SKU/code - required 
230
            '$action.getProvider()',                   // product name
221
	          'name': '$action.getProvider()',                   // product name
231
            'Digital',      // category or variation
222
	          'category': 'Digital',       // Category or variation
232
            '$order.getTotalAmount()', // unit price - required
223
	          'price': '$order.getTotalAmount()', // unit price - required
233
            '1'    // quantity - required
224
	          'quantity': '1'                   // Quantity
234
        ]);
225
	        });
235
        _gaq.push(['_trackTrans']);
226
	        ga('ecommerce:send');      // Send transaction and item data to Google Analytics.
236
    }
227
    }
237
 
228
 
238
      (function() {
229
      (function() {
239
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
230
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
240
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
231
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';