1 / 6
Aug 2013

So I've read the info on how to add the code to my sales page and I still am not seeing tracking in GA (http://www.e-junkie.com/ej/help.tracking.htm).



I'm using the Add to Cart/View Cart buttons on one page and I have my own Thank You page. I've added this tracking code directly from E-junkie info to my page and changed the "UA..." to my own GA account:

<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>



In case you need to see that page for more clairificaiton it's http://www.lamberjules.com/healthy-living/organic-products/homemade-natural-face-wash-remedies-for-rosacea-get-rid-of-redness-and-bumps-caused-by-rosacea/.



I DO NOT have a script on my personal thank you page as e-junkie docs say not to add it. I have turned on the e-commerce section in GA per ejunkie docs.



I'm at a loss.



Thanks in advance for your assistance.

Amber

  • created

    Aug '13
  • last reply

    Jan '14
  • 5

    replies

  • 1.5k

    views

  • 3

    users

  • 11

    links

It appears your site is built in WordPress and has a "Google Analyticator" plugin installed, so that is probably conflicting with our version of the GA tracking code. If you want to use our GA code, you must use that code on every page where you wish to use GA tracking -- i.e., don't mix-match our GA code with any other GA code, whether on the same page or across different pages.



Also, the first purchase button on your page is not displaying our standard overlay-style cart "inside" your page, so any purchases made through that button would not engage our GA tracking code properly. The second purchase button further down on that page is opening the overlay cart, so you may just need to copy that button and paste it in place of the first button you currently have there.



It also appears you are redirecting to a Common Thank-you Page URL on your site, so you should also paste our version of the GA tracking code into that page (our docs only say that you should not add this code to your standard E-junkie-generated thank-you pages). In this case, you would be giving up GA Ecommerce Tracking, which will only work with your standard E-junkie-generated thank-you pages. If you prefer to use Ecommerce Tracking, you can go to Seller Admin > Account Preferences and delete your Common Thank-you Page URL there.

Thank you for reply. I fixed that button. Well I guess I'll give up the ecommerce tracking then. I did set a Goal tracker for my own thank you page so we'll see how that works.



Thanks.

4 months later

HI



Question here - this is the closest related thread I could find.



Can I use the E-Junkie google code globally in WP (in a theme setting, let's say), and will it send all the non-ecommerce tracking info to google as well?



Or, should I use google's code on non ecom pages and e-junkies code on the ecom pages.



I am using Add to Cart, with the overlay-style cart.



PS site is not live yet - so please don't refer to my current site!



Thank you



Adam Rafferty

We actually recommend using only our version of the GA tracking code on all pages, or only Google's version on all pages -- i.e., do not mix-match our GA code with Google's GA code on the same page nor across different pages of the same site, which has been shown to cause inconsistent tracking and other conflicts.



You should be able to use WP features to insert your tracking code on every page automatically, as long as this allows you to specify the exact code to insert -- i.e., avoid analytics plugins for WP that have their own version of GA code baked-in, or which do other things beyond simply inserting a block of code you provide.



For best page-load performance, we recommend adding your GA code as close to the end of the page as possible but before the </body> tag, such as in a common page footer area. In fact, while you're at it, you might also include the script portion of your View Cart code along with the GA code, like so:



<script language="javascript" type="text/javascript">

<!--

function EJEJC_lc(th) { return false; }

// -->

</script>

<script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'></script>

<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>



Then wherever you wish to display the actual View Cart button on each page, just paste the linked-image part of your View Cart code, like so:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=123885&ejc=2" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="http://www.e-junkie.com/ej/ejview_cart.gif" border="0" alt="View Cart"/></a>

TYson this is an excellent answer and you guys are just so clear about what you do.



I had prety much done this, except I put the tracking code in the head, and the view cart toward the end. I will move the tracking code there as rec'd by you



...And yes I am seeing that plugins can misbehave, better to copy code in myself.



Thank you 1000x.



Adam