Author Topic: Virtuemart conversion tracking with Google Analytics - HOW??  (Read 40901 times)

Camiband

  • Beginner
  • *
  • Posts: 8
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #30 on: June 25, 2010, 15:16:07 pm »
jenkinhill,

I am about to create the code to insert into the "checkout.thankyou.tpl.php" page as you suggested.  However, when I create the code Google asks for the "appropriate dynamic variable" (such as Total_Cost).  What is the dynamic variable for the page that will give me the "total order" as indicated on the Virtuemart Purchase Order?  Thanks.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27478
  • Always on vacation
    • Jenkin Hill Internet
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #31 on: June 25, 2010, 21:06:47 pm »
At a guess you should run VirtueMart in debug mode to display the steps/variables.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10057 on Joomla 3.9.10 PHP 7.0.33
Testing VM 3.5.0.10097 on Joomla 3.9.10

Camiband

  • Beginner
  • *
  • Posts: 8
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #32 on: June 27, 2010, 19:16:14 pm »
How do you run Virtuemart in the debug mode?

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27478
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10057 on Joomla 3.9.10 PHP 7.0.33
Testing VM 3.5.0.10097 on Joomla 3.9.10

NeliusH

  • Beginner
  • *
  • Posts: 6
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #34 on: June 29, 2010, 20:40:21 pm »
Hi,

I'm a bit perplexed by the complexity of this all.
The normal google tracking code is so simple to install, why is this e-commerce code so complex.

Isn't there someone how just has a simple snippet of code that work with VM.

I tried putting the google sample code into the extra payment field in payment methods>configuration.

It works and shows in analytics e-commerce tracking, but only gives the values as mentioned in the script.

I know I have to change these values, but don't know the proper ones to work with the VM cart or checkout.

Is there any one that can help me on this one?

best,
Harald

P.S.
This is the Google sample code I pasted into the extra payment field:
Code: [Select]
<script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
  var pageTracker = _gat._getTracker("UA-xxxxx-x");
  pageTracker._trackPageview();
  pageTracker._addTrans(
      "1234",            // order ID - required
      "Womens Apparel",  // affiliation or store name
      "11.99",           // total - required
      "1.29",            // tax
      "15.00",           // shipping
      "San Jose",        // city
      "California",      // state or province
      "USA"              // country
    );
 
 
   // add item might be called for every item in the shopping cart
   // where your ecommerce engine loops through each item in the cart and
   // prints out _addItem for each 
   pageTracker._addItem(
      "1234",           // order ID - necessary to associate item with transaction
      "DD44",           // SKU/code - required
      "T-Shirt",        // product name
      "Olive Medium",   // category or variation
      "11.99",          // unit price - required
      "1"               // quantity - required
   );
 
   pageTracker._trackTrans(); //submits transaction to the Analytics servers
} catch(err) {}
</script>

erick_alcala

  • Jr. Member
  • **
  • Posts: 155
  • Everything is Possible!
    • Ofix-Comp
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #35 on: June 29, 2010, 20:57:28 pm »
Gary, did you solve the google analytics issue?

Cinos there are two ways you can do this in my understanding.

1. copy the link of your register button and paste it into google analytics tracking.
2. create an thank you for registering article and give that link to google analytics.
wanting to learn to create good templates

Camiband

  • Beginner
  • *
  • Posts: 8
Re: Virtuemart conversion tracking with Google Analytics - HOW??
« Reply #36 on: June 30, 2010, 15:18:28 pm »
From what I understand, and its not much, the client needs to be automatically returned to the thank you checkout page.  However, I've been told that this is a dynamically created page specific to a clients order. That creates a question: In Paypal you can select the option: "Auto Return for PayPal Payments" which would automatically redirect all customers with a paypal account (not perfect but better than nothing) back to my website and conceivable pick up the ecommerce tracking by Google Does anybody know how I can determine what URL should be inserted for the dynamically created page?  Is it even possible?  If not then what's the point of this whole thread?