Page 1 of 1

Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 3:45 am
by ecoleman
Hi Guys.

I'm busy setting up our new shop using Opencart and so far it looks really good.
I registered to become an affiliate as a test and logged in but when I click on the Custom Affiliate Tracking Code link it takes me to a page with the following.

Your Tracking code: This has a generated number in it.

Tracking Link Generator: This is blank, but even though I type something in there nothing happens.

Tracking Link: This is blank

I'm guessing that this should generate a link that the affiliate can place on a website but I can not get it to generate anything. Also is there a way that the affiliate can have a generic link (ie not product specific?)

Thanks in Advance
Elliott

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 4:42 am
by SXGuy
if you type a product name it will generate a tracking code, if you have no products added, it wont work.

thats just one method to generate links, to generate other types of links you would need to modify the page, but you can give people any link to your website with the same tracking code data you see in the link it generates and add it to the end of any url.

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 4:48 am
by ecoleman
Thanks for the reply.

I do have products and I have tried typing the product names into the text box, but nothing happens.
Does it generate on the fly or should I be seeing a button to click?

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 7:46 am
by SXGuy
it should auto populate once you have started typing the first few letters.

what browser are you using?
what is the version of opencart?
custom theme or default theme?

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 3:42 pm
by ecoleman
I'm using Chrome 15.0.874.121 for Mac
Opencart v1.5.1.3

It's a custom template. I did think of that last night and I will take a look today to see if affiliate php file has been modified at all.

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 4:08 pm
by ecoleman
Thanks for your help SXGuy. I've fixed it. Whoever developed the template had changed the Autocomplete javascript which didn't work.
I've replaced it with the original and it's working now.

Can I just clarify that if I give out a link www.mydomain.com?tracking=4edd1e24b1758 that this will still track any sales made for that affiliate without actually linking to any specific product.

Cheers
Elliott

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 4:08 pm
by ecoleman
Thanks for your help SXGuy. I've fixed it. Whoever developed the template had changed the Autocomplete javascript which didn't work.
I've replaced it with the original and it's working now.

Can I just clarify that if I give out a link www.mydomain.com?tracking=4edd1e24b1758 that this will still track any sales made for that affiliate without actually linking to any specific product.

Cheers
Elliott

Re: Can somebody explain affiliate tracking please

Posted: Tue Dec 06, 2011 7:16 pm
by SXGuy
yes, that will link all sales to that affiliate id providing the session is still active, i.e providing the user doesnt close the browsers and then navigate back to your site without the affiliate link.

Re: Can somebody explain affiliate tracking please

Posted: Thu Dec 15, 2011 12:25 am
by lesstalk
So this is working for you using 1.5.1.3 and a custom template now? I have a developer is telling me that the Affiliate feature doesn't work out of the box for 1.5.1.3 due to a bug, but I'm getting that same autocomplete javascript error (via Firebug Console) and I'd really like to use the Affiliate feature for my shop.

Where and how did you replace the autocomplete javascript?

Thanks!

Re: Can somebody explain affiliate tracking please

Posted: Thu Dec 15, 2011 12:36 am
by ecoleman
I just compared the tracking.tpl file in my custom template to the one on the default template.
The javascript snippets differ, so I just copied and one from the default file and pasted it over the code in the template file. This sorted the problem.

This is just the code that generates the link. I have not tested any further, so if there is another bug in 1.5.1.3 I am not yet aware of it.

The default javascript is as follows:

Code: Select all

<script type="text/javascript"><!--
$('input[name=\'product\']').autocomplete({
	delay: 0,
	source: function(request, response) {
		$.ajax({
			url: 'index.php?route=affiliate/tracking/autocomplete&filter_name=' +  encodeURIComponent(request.term),
			dataType: 'json',
			success: function(json) {		
				response($.map(json, function(item) {
					return {
						label: item.name,
						value: item.link
					}
				}));
			}
		});
		
	},
	select: function(event, ui) {
		$('input[name=\'product\']').attr('value', ui.item.label);
		$('textarea[name=\'link\']').attr('value', ui.item.value);
						
		return false;
	}
});
//--></script> 

Re: Can somebody explain affiliate tracking please

Posted: Thu Dec 22, 2011 8:17 pm
by kenetix
the code is correct. Most likely the javascript file isn't loaded correctly.

This code should exist for versions 1.5.1.3 and above in your template/common/header.tpl file.

Code: Select all

<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />

Re: Can somebody explain affiliate tracking please

Posted: Thu Dec 22, 2011 10:05 pm
by ecoleman
My site is loading both the JS and CSS file correctly but still the Affilate javascript did not work.

Can somebody explain affiliate tracking please

Posted: Sun Jan 08, 2012 9:55 pm
by paul133
I have had this problem .

It was caused by the custom template.

It seems to have been fixed by editing the file:
header.tpl inside the catalog\view\theme\YOUTEMPLATENAME\common\header.tpl file

In my case I replaced line 24 :
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.9.custom.min.js">

with
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js">

LIne 25
replace
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.9.custom.css" />
with
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />

Tracking generator didn't work

Posted: Thu Feb 02, 2012 2:55 am
by vicky_vale_71
I had exact same problem - crista template on 1.5.1.3. Affiliate tracking generator didn't autofil

I changed lines 24 and 25 of header.tlp file exactly as described by paul133.

I am a complete newbie and have got in some right pickles fiddling with code I didn't understand - but that worked a treat. Thanks Paul

Re: Can somebody explain affiliate tracking please

Posted: Fri Feb 10, 2012 2:26 am
by kamyabi
I have the same problem.
I checked header.tpl in my template and it is "jquery-ui-1.8.16" but auto fill still does not work.
Can anyone help me?
I am using 1.5.1.3 with Breshka (Theme Global) template.

Re: Can somebody explain affiliate tracking please

Posted: Wed May 02, 2012 10:29 pm
by Quentin100
Hi, I have tried the above www.mydomain.com?tracking=4edd1e24b1758 method and it didn't work.

Can anyone confirm if I paste www.mydomain.com?tracking=4edd1e24b1758 (with my domain and tracking code not the sample one) into a browser and then proceed to add a product to cart, login and checkout, that the system will associate that sale with that affiliate?

All info I have found to date is that the affiliate code only works for the unique product, eg http://www.mydomain.com/some-category/s ... d1e24b1758 and I have to create a unique tracking code for every product I have, rather than 1 code per affiliate that remains valid for the lifetime of that session.

This is kind of critical for me and will mean I need to completely re-design my clients solution if the affiliate tracking is per product rather than per site visit.

Re: Can somebody explain affiliate tracking please

Posted: Tue May 08, 2012 10:48 am
by peteVA
Can I have a number of affiliates and supply them each with a website / webpage with a "check our shop" type link with an affiliate code go to my real home page and then as they place orders in the cart have the affiliate earn on each item?

I'm not concerned about saving the cookie for later purchase, just at that time, that visit through my affiliate's page, if the URL to my home page includes their code, will they get credit for all items purchased during that visit?

Re: Can somebody explain affiliate tracking please

Posted: Thu May 17, 2012 11:44 pm
by markaduffy
I'm having problems with affiliate tracking. I put through a dummy payment, and the affiliate did not receive the credit for the purchase using their tracking code. I have the affiliate approved, and there is products.