Google Analytics, AdWords, & other tracking code
NOTES ON SALE CONVERSION TRACKING:
- 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;
- Google Checkout sends Google E-commerce conversion tracking data even when the buyer does not choose to continue past Checkout to reach the thank-you page;
- Checkouts using regular PayPal standard, Google Checkout, or TrialPay require the buyer to manually click past Checkout to reach the thank-you page where sales conversion tracking for Google Analytics, AdWords or other third-party tracking could occur;
- Checkouts via PayPal Pro, Authorize.Net, ClickBank or 2CheckOut will refresh to the thank-you page automatically upon successful payment completion.
How to enable tracking for Google Analytics with E-junkie?
E-junkie cart buttons come pre-integrated with Google Analytics. Just place the following tracking code at the bottom of the page where you are placing E-junkie cart buttons, 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.
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 Analytics account even if the buyer does not continue past Checkout to reach the "thank you" page.
Do not add Analytics tracking code in your E-junkie-provided Thank-you Page if you are using E-junkie Add to Cart/View Cart buttons, as that would conflict with the integrated Analytics tracking we already provide. If you are using a Common Thank-you Page URL or product-based Redirection URLs, then you should place our version of the Google Analytics code (see above) in your site's Thank-you/Redirect Page(s) as well.
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 the Analytics tracking code in your thank-you page.
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.