Google Analytics, AdWords, & other tracking code
IMPORTANT - Notes on "conversion tracking":
- Google Analytics (and other tracking methods that depend on the buyer viewing a thank-you page) may not track actual sale conversions consistently, depending on which checkout method the buyer uses:
- Checkouts using regular PayPal standard, PayPal Express (PayPal Pro checkouts using a buyer's PayPal account), Google Checkout, or TrialPay require the buyer to manually click past the end of Checkout to reach the thank-you page where sale-conversion tracking for Google Analytics, AdWords or other third-party tracking could occur;
- Checkouts via PayPal Pro (direct card payments only), Authorize.Net, ClickBank, or 2CheckOut will refresh to the thank-you page automatically upon successful payment completion.
- Conversions should track fairly consistently for buyers purchasing any download product, since those buyers must view their thank-you page in order to download their product;
- Google Checkout transmits Google E-commerce Tracking data even when the buyer does not choose to continue past Checkout to reach the thank-you page, and E-commerce Tracking data will also be transmitted for checkouts using other payment processors if and when a buyer continues to view their E-junkie thank-you page (but not if you redirect to a thank-you page on your site, nor if the buyer never views any thank-you page at all);
- E-junkie's built-in Affiliate Programs can credit your E-junkie Affiliates for their sale conversions regardless of whether a buyer visits any thank-you page.
How to enable tracking for Google Analytics with E-junkie
If you are using E-junkie Buy Now buttons:
If you are only using E-junkie Buy Now buttons -- not using our Add to Cart/View Cart buttons -- then you would need to follow Google's own instructions for "third party eCommerce" and paste their Analytics tracking code into your site's pages and into your thank-you page. In this case, E-junkie would be completely uninvolved in your Google Analytics tracking, so you would need to consult Google Analytics support for any assistance you may require.
If you are using E-junkie Add to Cart/View Cart buttons:
E-junkie cart buttons are pre-integrated with Google Analytics. When you use E-junkie Cart buttons, we take care of context transfer and also ensure that we don't report duplicate sales if the buyer returns to their thank-you page again. Not only that, you can also track which buttons a buyer is clicking on your site. If you are using Google Checkout, then sales are reported to your Google E-commerce tracking account even if the buyer does not continue past Checkout to reach the thank-you page.
Just place the following tracking code in your site at the bottom of every page (just before your </body> tag should be fine) wherever you are using E-junkie cart buttons, and also in any other pages in your site where you wish to use Analytics tracking as well, and make sure you replace UA-XXXXXX-X with the ID provided to you in your code from Google Analytics.
This is our current Google Analytics tracking code (to track cart-button activity, use this version rather than the generic tracking code Google provides):
<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">
var ejGATracker = _gat._getTracker("UA-XXXXX-X");
ejGATracker._setDomainName("none");
ejGATracker._setAllowLinker(true);
ejGATracker._trackPageview();
</script>
We also continue to support the older version of Google Analytics tracking code, which you would place in your page like so:
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_udn="none";
_ulink=1;
_uacct = "UA-XXXXXX-X";
urchinTracker();
</script>
Again, do make sure you replace UA-XXXXXX-X with the ID from the code provided to you by Google Analytics.
Do not add any Analytics tracking code into your E-junkie Thank-you Page customization fields if you are using E-junkie Add to Cart/View Cart buttons, as that would conflict with the integrated Analytics tracking we already provide there. However, if you are redirecting buyers to a Common Thank-you Page URL or product-based Redirection URLs, then you should place our version of the Google Analytics code (as specified above) in your own site's Thank-you/Redirect Page(s) as well.
If you are setting Goals in your Analytics account, you will need to enter https://www.e-junkie.com/ecom/rp.php and under additional settings, set Match Type as Head Match.
How to enable tracking for Google Adwords, Yahoo overture, MSN Adcenter, AdBrite and other such programs?
All these services will provide you with a custom code snippet that they require you to place on your "thank you" page. If available, use the "secure" code.
Best place to place this code is in your generic "thank you" page by going to Admin > Account Preferences. If the code is item specific, you can enter that in the HTML for thank you page while adding or editing your product. You can reach that screen by pressing "more options" while adding the product.
If the code requires you to use some transaction or product specific data, you can use template variables.
If a service requires the code to be placed on your site and not a third party website (like E-junkie), then you can either place the code on a page on your website and then include that page on your E-junkie thank you page using an iframe like so:
<iframe src="http://www.yoursite.com/your.thank.you.page.html"
style="width:0;height:0;border:0;"></iframe>
...OR...
You can simply redirect the buyer to the thank you page on your site. This is not recommended if you are selling digital items as then your buyer will not be able to access the product instantly.