<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Tracciamento transazione _trackTrans]]></title><description><![CDATA[<p dir="auto">Ciao a tutti, vorrei tracciare la conversione in fase di checkout tramite la funzione <strong>_trackTrans</strong>.</p>
<p dir="auto">Nelal paittaforma che sto utilizzando ho un problema nella modifica dell'header in singole sezioni, in pratica nella documentazione di google si cita questo codice:</p>
<pre><code>[COLOR=#000000][FONT=inherit]_gaq[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]push[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'_setAccount'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'UA-XXXXX-X'[/FONT][/COLOR][COLOR=#666600][FONT=inherit]]);[/FONT][/COLOR]
[COLOR=#000000][FONT=inherit]_gaq[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]push[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'_trackPageview'[/FONT][/COLOR][COLOR=#666600][FONT=inherit]]);[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
_gaq[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]push[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'_addTrans'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'1234'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// transaction ID - required[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'Womens Apparel'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// affiliation or store name[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'28.28'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// total - required[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'1.29'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// tax[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'15.00'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// shipping[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'San Jose'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// city[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'California'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// state or province[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'USA'[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// country[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
[/FONT][/COLOR][COLOR=#666600][FONT=inherit]]);[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
_gaq[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]push[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'_addItem'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'1234'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// transaction ID - necessary to associate item with transaction[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'DD44'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// SKU/code - required[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'T-Shirt'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// product name[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'Olive Medium'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// category or variation[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'11.99'[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// unit price - required[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
   [/FONT][/COLOR][COLOR=#008800][FONT=inherit]'1'[/FONT][/COLOR][COLOR=#880000][FONT=inherit]// quantity - required[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
[/FONT][/COLOR][COLOR=#666600][FONT=inherit]]);[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
[/FONT][/COLOR][COLOR=#000000][FONT=inherit]_gaq[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]push[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([[/FONT][/COLOR][COLOR=#008800][FONT=inherit]'_trackTrans'[/FONT][/COLOR][COLOR=#666600][FONT=inherit]]);[/FONT][/COLOR]
</code></pre>
<p dir="auto">Tralasciando al momento la parte _addItem vorrei inserire il tracciamento all'interno di body perchè posso solo modificare la template in body per la sezione checkout.<br />
MI troverei quindi due codici di tracciamento:</p>
<ol>
<li>in header il classico e completo codice di GA</li>
<li>in body questo codice sopra dove chiaramente avviene un DOPPIO tracciamento.</li>
</ol>
<p dir="auto">Come posso risolvere?<br />
Se nel &lt;body&gt; metto solo</p>
<pre><code>&lt;script type="text/javascript"&gt;   _gaq.push(['_addTrans',
      '1234',           // transaction ID - required
      'Womens Apparel', // affiliation or store name ex Brand
      '28.28',          // total - required; Shown as "Revenue" in the
                        // Transactions report. Does not include Tax and Shipping.
      '1.29',           // tax
      '15.00',          // shipping
      'San Jose',       // city
      'California',     // state or province
      'USA'             // country
   ]);
  _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
&lt;/script&gt;
</code></pre>
<p dir="auto">Rischio (e ne sono quasi sicuro) che non tracci nulla perchè la funzione che esegue il tracking è in &lt;head&gt; o mi sbaglio io? ovvero:</p>
<pre><code>[TABLE]
[TR]
[TD="class: webkit-line-content"]  (function() {[/TD]
[/TR]
[TR]
[TD="class: webkit-line-number"][/TD]
[TD="class: webkit-line-content"]    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;[/TD]
[/TR]
[TR]
[TD="class: webkit-line-number"][/TD]
[TD="class: webkit-line-content"]... blablabla[/TD]
[/TR]
[TR]
[TD="class: webkit-line-number"][/TD]
[TD="class: webkit-line-content"];[/TD]
[/TR]
[/TABLE]
</code></pre>
<p dir="auto">Sapete aiutarmi?</p>
<p dir="auto">Grazie dell'aiuto</p>
]]></description><link>https://dev.connect.gt/topic/197257/tracciamento-transazione-_tracktrans</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 08:34:52 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/197257.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Dec 2013 11:47:47 GMT</pubDate><ttl>60</ttl></channel></rss>