Found just one thread where there was not a clear answer...

http://www.e-junkie.com/bb/topic/5158





What do I Have?

1) www.mysite.com/sales_letter.html where I'm selling my ebook

2) Ability to put any HTML code into my e-junkie thank you page in the options of the product.



So, I want to track visitors from http://mysite.com/salesletter.html ... to e-junkie's thank you page, right? To track sales and conversions more easily.



==============



Basically, I want to track my sales using e-junkie's "Buy" button:

http://www.e-junkie.com/ej/help.tracking.htm



So the e-junkie's "instructions" basically tell me that I need to insert the Analytics code to my main site's page and to my "thank you page". Then, I'm suggested that I visit Google's documentations for further instructions on how to setup "third party eCommerce"



Here is the link to Google's instructions:

http://support.google.com/googleanalytics/bin/answer.py?hl=en&hlrm=ru&answer=55532



So, I got the first step (creating a duplicate profile). I did that.

No idea what the heck "Use a filter on the profile to distinguish between domains" is.



Here is my original analytics code for both of my main and duplicate profile:

<script type="text/javascript">



var _gaq = _gaq || [];

gaq.push(['setAccount', 'UA-XXXX-XX']);

gaq.push(['trackPageview']);



(function() {

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();



</script>



I) Then, I presume... I need to update my http://mysite.com/salesletter.html's Analytics' code to :



<script type="text/javascript">



var _gaq = _gaq || [];

gaq.push(['setAccount', 'UA-XXXX-XX']);

gaq.push(['setAllowLinker', true]);

gaq.push(['setDomainName', 'mysite.com']);

gaq.push(['trackPageview']);



(function() {

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();



</script>

...



And I also need to edit onsubmit and onclick functions of my forms/buy now buttons like the Google tells me to:



<a href="(What Do I put here?)"

onclick="gaq.push(['link', '(What Do I put here?)']); return false;">View My Blog</a>



[The problem is what do I put into "a href=..." and gag.push?]



Or



<form name="f" method="post" onsubmit="gaq.push(['linkByPost', this]);">



This one seems more straightforward.



II) Then, I presume that I need to put this code into my e-junkie product's thank you page HTML:



<script type="text/javascript">



var _gaq = _gaq || [];

gaq.push(['setAccount', 'UA-XXXX-XX']);



gaq.push(['setDomainName', 'none']);

gaq.push(['setAllowLinker', true]);

gaq.push(['trackPageview']);



(function() {

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();



</script>



I don't think I need to edit any <a href...> or <form> on my thank you page as I will have none of that.



Well, yup. Do I understand everything correctly? :P

Has anyone figured out a way to do that properly? Do I need to do something on top of just tweaking analytics' codes?



And do I need to modify Analytics code on my WHOLE website or only on my sales_letter.html?



Thank you for reading through my newbie'ness! : )

  • created

    Dec '11
  • last reply

    Dec '11
  • 1

    reply

  • 1.1k

    views

  • 2

    users

  • 10

    links

As you have apparently determined already, since you are using Buy Now buttons, you cannot use our version of the GA tracking code which only works with our Cart buttons, so you would need to use the standard tracking code provided by GA. You should use the same tracking code on every page where you want to use GA tracking, including your E-junkie thank-you pages if you're using the standard GA tracking code.



For basic conversion tracking using GA, see the section about "Goals-based Conversion Tracking" on our tracking help page:

http://www.e-junkie.com/ej/help.tracking.htm



If you also want to track button-click "events" as well as page visits, you can just add GA's recommended onclick=/onsubmit= attributes to the Buy Now button codes you'd obtain from your E-junkie Seller Admin, like so:



<a href="https://www.e-junkie.com/ecom/gb.php?i=XXXXXX&c=single&cl=194996" target="ejejcsingle" onclick="gaq.push...etc."><img src="http://www.e-junkie.com/ej/x-click-butcc.gif" border="0" alt="Buy Now"/></a>



...or...



<form method="POST" accept-charset="UTF-8" target="ejejcsingle" action="https://www.e-junkie.com/ecom/gb.php?i=XXXXXX&c=single&cl=194996" onsubmit="gaq.push...etc."><input type="hidden" name="on0" value="Promotion"/>Discount Code:<br/><input type="text" name="os0"/><br/><input type="image" src="http://www.e-junkie.com/ej/x-click-butcc.gif" border="0" alt="Buy Now"/></form>



You would need to consult the GA help/documentation pages and forums about how to configure those onclick=/onsubmit= attributes, as that does not involve our system at all, so we're not familiar with it. We can only provide support for matters pertaining directly to our own system, features, and button codes.