polynikes300 Posted August 13, 2013 Share Posted August 13, 2013 Hi I have the following code for a 'Linked in button' which I want to put onto my product pages. <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: fr_FR </script> <script type="IN/Share" data-url="http://velofrance.fr" data-counter="right"></script> Can anyone tell me where to place this code so that it will put the 'Linked in box' below the product on the view product page? I presume this must be a similar process for all 'social media' NOT included in the module version? ie facebook. I've been able to add 'Pinterest' using a Presto Changeo module but can't see any module option for Linked In. Thanks Poly Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 everything depends on where you want to insert the button, here are available places: let me know where exactly, then i will show you correct way to achieve what you expected Link to comment Share on other sites More sharing options...
polynikes300 Posted August 13, 2013 Author Share Posted August 13, 2013 Thanks Vekia, Position 1 is where I currently have both facebook and Pinterest.... so I'd prefer 'Linked in' to follow in the vertical list please. Poly Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 thanks for clarification, so in this case open the file: themes/your_theme/product.tpl you've got there something like: <ul id="usefull_link_block"> {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if} <li class="print"><a href="javascript:print();">{l s='Print'}</a></li> {if $have_image && !$jqZoomEnabled} {/if} </ul> right after the: <li class="print"><a href="javascript:print();">{l s='Print'}</a></li> you can add own code. my another question: code that you mentioned above is only javascript, have you got any additional code from linked in ? or it is all what you've got? Link to comment Share on other sites More sharing options...
polynikes300 Posted August 13, 2013 Author Share Posted August 13, 2013 Hi I've not checked the code but obviously you think its not up to the job? I'll look again at Linked in - unless anyone can point me to a 'site' or blog that displays social media intergration codes? Seems like a good idea to me. Thanks again Link to comment Share on other sites More sharing options...
polynikes300 Posted August 15, 2013 Author Share Posted August 15, 2013 Hi Please take a look at the following 'helpful advice info' I have regarding the LinkedIn button. BLUE text is 3rd person advice and RED is myself CAPITAL LETTERS & Vekia. <script src="http://platform.linkedin.com/in.js" type="text/javascript"></script> <script type="IN/Share" data-counter="right"></script> THIS IS FROM LINKEDIN Now you need to add an additional parameter to the code in order to trigger the Google Analytics when the user shares your content via the LinkedIn Share Button: data-onsuccess="LinkedInShare". Place the resulting code: <script type="IN/Share" data-counter="right" data-onsuccess="LinkedInShare"></script> within the <body> ... </body> tags of your file, where you want the LinkedIn Share Button to appear. thanks for clarification, so in this case open the file: themes/your_theme/product.tpl you've got there something like: <ul id="usefull_link_block"> {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if} <li class="print"><a href="javascript:print();">{l s='Print'}</a></li> {if $have_image && !$jqZoomEnabled} {/if} </ul> right after the: <li class="print"><a href="javascript:print();">{l s='Print'}</a></li> you can add own code. Add JavaScript to your file to make it work Now you’ll see the purpose of the data-onsuccess="LinkedInShare" you added to the provided Share Button code. The following JavaScript — the “LinkedInShare” function — should be placed within the <head> tag of your file, preferably after the JavaScript that calls the Google Analytics JavaScript (ga_social_tracking.js):WHERE IS THIS? <!-- Google Analytics Social Button Tracking --> <script type="text/javascript" src="/js/ga_social_tracking.js"></script> <!-- LinkedIn Share Button tracking--> <script type="text/javascript"> function LinkedInShare() { _gaq.push(['_trackSocial', 'LinkedIn', 'Share']); } </script> 2 Questions please:- Is this code correct? Can someone with more knowledge & experience please be kind enough to complie it into a 'completed block' so that I can review it with WC3 and try to learn from it, before I post it into my site. I can't thank you enough for taking the trouble to help out an amateur! Poly Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now