You Tube Linking does not work

pauca007
Topic Author
Posts: 3
6 years 3 months ago #2009 by pauca007
You Tube Linking does not work was created by pauca007
after having installed all social media links work fine EXCEPT any links to YouTube. website: www.quayhealth.com.au

Any solution for this?

Thanks,

Pauca

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1180
6 years 3 months ago #2010 by Lodder
Replied by Lodder on topic You Tube Linking does not work
Hi Pauca

You appear to have some Javascript that is tracking and blocking Youtube links. I'm not sure where it's coming from exactly.

This is the code that's causing the problem:
function trackOutboundLink(link, category, action) {
	try {
	_	gaq.push(['_trackEvent', category , action]);
	} catch(err){}
	
	setTimeout(function() {
		var patt=/youtube|youtu.be/i;
		if (!patt.test(link.href)) {
			document.location.href = link.href;
		}
	}, 100);
}

window.addEvent('domready', function(){
	$$('a:not([href*="' + document.domain + '"])').each(function(el){
		el.addEvent('click', function(){
			trackOutboundLink(this, 'Outbound Links', el.getProperty('href')); return false;
		});
	});
});

You have 2 options:

1. Remove the script that is tracking and blocking the Youtube links. It will either be coming from an extension or from your template's index.php file.
2. Use a short link tool such as TinyURL or Bitly

Kind regards,
Lodder

Please Log in or Create an account to join the conversation.

pauca007
Topic Author
Posts: 3
6 years 3 months ago #2011 by pauca007
Replied by pauca007 on topic You Tube Linking does not work
Thanks for the insight and fast support! I will get that script out that blocks it. Why would they have written such script anyway? Doesnt make sense to me. But thanks a lot! very much appreciated:-)

Please Log in or Create an account to join the conversation.

pauca007
Topic Author
Posts: 3
6 years 3 months ago #2012 by pauca007
Replied by pauca007 on topic You Tube Linking does not work
The code came from a Google Analytics plugin. Option number 2 also worked great as a work around.

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1180
6 years 3 months ago #2013 by Lodder
Replied by Lodder on topic You Tube Linking does not work
Glad you got it fixed in the end :)

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum