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! : )