Analytics, Pro-sites, conversion tracking. How to?

Hi!

I have installed and setted up wpmudev's Google Analytics plugin fow whole network. For that I created API-project for it and it's working fine for whole network.

Then I created new Google Analytics account for my main site and use it only on that site.

This is at my sites <head>. It uses both, or only main sites' analytics?

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','gaplusu');

gaplusu('create', 'UA-XXXXXXXX-1', 'auto', {'allowLinker': true});
gaplusu('send', 'pageview');

gaplusu('create', 'UA-XXXXXXXX-2', 'auto', {'name': 'single'});
gaplusu('single.send', 'pageview');

Is this plugin build to work like that? I can and maybe should use own tracking code for the main site?

Pro-sites plugin has a place for adding "Thank You Message". It says you can put conversion tracking script there. I have enabled eCommerce at google analytics, but I'm not sure what scripts should I insert to "Thank You Message".

I've enabled Asynchronous Analytics Ecommerce Tracking at Pro Sites' settings.

I can see it puts some code to my site which should be sent to Google Analytics, right? Well, it doesn't seem to do that. "Uncaught ReferenceError: _gaq is not defined" is all I get.

That code below looks right and is done by Pro Sites so should I add some scripts to "Thank You Message" though?

_gaq.push(["_addTrans",
	"46_XXXXXXXXX",          // order ID - required
	" Pro Site",// affiliation or store name
	"0",            // total - required
	"",                       // tax
	"",                       // shipping
	"MYSITE",      // city
	"",     // state or province
	""    // country
]);
_gaq.push(["_addItem",
	"46_XXXXXXX",    // order ID - necessary to associate item with transaction
	"level1_12month",         // SKU/code - required
	"Startup",// product name
	"12 Month",    // category
	"0",      // unit price - required
	"1"                 // quantity - required
]);
_gaq.push(["_trackTrans"]);
  • Adam Czajczyk

    Hello richidi,

    I hope you're well today and thank you for your question!

    I let myself move you question to our support forum and assign it to a Google Analytics+ plugin. I think that's more a support request from you rather than a community discussion. If I'm not right and you'd like it to stay in a "Members" only forum area, let me know please and I'll move it back.

    As for Google Analytics+ setup. There are two ways for this plugin to work: a site-wide (network enabled) or "per site" (activated on "per site") basis.

    The "per site" install requires setting up a separate app for each site and all the stats are applied only to that app (meaning the single site/sub-site of the network). There's no "overall" stats then either.

    From what you wrote, I suppose though that you have "network enabled" the plugin. This means that using Google Analytics+ settings in your "Network Admin" dashboard you can setup tracking of your entire Network. The stats are for Network owner though sub-site admins are allowed to see some parts of it. Yet, this setup allows site admins (including you as an admin of the main site) still to add their own tracking for their sites. Therefore this setup (including what's worrying you) should work fine.

    As for Pro Sites. If you're already using analytics code on your site (on all pages but that's default with Google Analytics+ and WordPress) you shouldn't need to put any additional code in to the "Thank you" page once e-commerce tracking is enabled. Current Google Analytics console follows all the traffic/actions on your site and you can use that GA dashboard to setup goals/filters etc to precisely track conversions.

    I hope that helps!
    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.