Post by PAULAOPRIS » Thu Apr 18, 2019 8:53 pm

Buna,
Codul de google analytics pentru tranzactii l-am creat pe site.
In pagina de succes vad toate informatiile insa in analytics nu apar deloc.
Oare am gresit ceva la cod?
Multumesc
Image
Opencart 2.3.0.2

User avatar
New member

Posts

Joined
Thu Feb 02, 2017 6:37 pm

Post by florinsith » Sat Jul 06, 2019 3:12 pm

Instalati Tag assistant pe chrome si vedeti daca se trimit acele informatii.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by agatha65 » Mon Jul 08, 2019 1:57 am

You are using gtag
https://developers.google.com/analytics ... -ecommerce
Your script should be like this one:

Code: Select all

gtag('event', 'purchase', {
  "transaction_id": "24.031608523954162",
  "affiliation": "Google online store",
  "value": 23.07,
  "currency": "USD",
  "tax": 1.24,
  "shipping": 0,
  "items": [
    {
      "id": "P12345",
      "name": "Android Warhol T-Shirt",
      "list_name": "Search Results",
      "brand": "Google",
      "category": "Apparel/T-Shirts",
      "variant": "Black",
      "list_position": 1,
      "quantity": 2,
      "price": '2.0'
    },
    {
      "id": "P67890",
      "name": "Flame challenge TShirt",
      "list_name": "Search Results",
      "brand": "MyBrand",
      "category": "Apparel/T-Shirts",
      "variant": "Red",
      "list_position": 2,
      "quantity": 1,
      "price": '3.0'
    }
  ]
});
For checkout success page only you can use this(free)
https://www.opencart.com/index.php?rout ... n_id=22039
For a complete solution use this(paid)
https://www.opencart.com/index.php?rout ... n_id=25298

Print Version for Product Page and Product Compare Page | Rich Snippets | Facebook Open Graph Meta Tags | Information pages in top menu | Multi-Language Banners, Sliders and Carousels
Image


User avatar
Active Member

Posts

Joined
Fri Mar 16, 2012 10:18 am
Location - Canada, QC
Who is online

Users browsing this forum: No registered users and 5 guests