Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Digital Marketing
  4. Google Analytics e Web Analytics
  5. Tracciamento transazione _trackTrans

Tracciamento transazione _trackTrans

Pianificato Fissato Bloccato Spostato Google Analytics e Web Analytics
1 Post 1 Autori 513 Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • hedoH
    hedoH
    hedo
    scritto su ultima modifica di
    User Attivo 11
    #1
    Tracciamento transazione _trackTrans

    Ciao a tutti, vorrei tracciare la conversione in fase di checkout tramite la funzione _trackTrans.

    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:

    [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]
    

    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.
    MI troverei quindi due codici di tracciamento:

    1. in header il classico e completo codice di GA
    2. in body questo codice sopra dove chiaramente avviene un DOPPIO tracciamento.

    Come posso risolvere?
    Se nel <body> metto solo

    <script type="text/javascript">   _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
    </script>
    

    Rischio (e ne sono quasi sicuro) che non tracci nulla perchè la funzione che esegue il tracking è in <head> o mi sbaglio io? ovvero:

    [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]
    

    Sapete aiutarmi?

    Grazie dell'aiuto

    1 Risposta Ultima Risposta
    Miglior risposta 0
    0

    Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

    Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

    Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

    Registrati Accedi
    Rispondi
    • Risposta alla discussione
    Effettua l'accesso per rispondere
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti


    • Accedi

    • Non hai un account? Registrati

    • Accedi o registrati per effettuare la ricerca.
    • Primo post
      Ultimo post
    Home Accedi Registrati
    Menu
    • CATEGORIES
    • La Community Connect.gt
    • Presentati alla Community
    • News Ufficiali da Connect.gt
    • Internet News
    • A Scuola Di
    • Digital Marketing
    • Intelligenza Artificiale
    • SEO & GEO
    • Web Marketing e Content
    • Google Analytics e Web Analytics
    • Google Ads & Advertising
    • YouTube
    • TikTok, Instagram e altri Social
    • Google Adsense, Affiliazioni e Guadagno
    • E-Commerce
    • Coding e Sistemistica
    • Help Center: consigli per il tuo progetto
    • Hosting e Cloud
    • Coding
    • CMS & Piattaforme Self-Hosted
    • Annunci e Collaborazioni
    • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
    • Collaborazioni WEB e Lavoro: offro e cerco
    • Impresa, Fisco e Leggi
    • Consulenza Legale e Professioni Web
    • Consulenza Fiscale, Imprese, Startup e P.Iva
    • Gli Off Topic
    • PC, Smartphone e altri Hardware
    • Tutti i Software
    • GT Fetish Cafè
    • Discussioni
    • Non letti 0
    • Recenti
    • Hashtag
    • Popolare
    • Utenti
    • Privacy
    • Termini e condizioni
    • © 2026 Search On Media Group S.r.l.