What is the JavaScript Snippet?

The Geniuslink JavaScript snippet solution converts raw and/or affiliate links into buy.geni.us links. This tool is ideal for websites or blogs with many hardcoded affiliate links, or if you simply do not want to update your database. The JavaScript snippet should be placed in the head of each page or copied into your header template. Each time the page loads, your links are converted to geni.us links on the fly! It even supports a mix of Amazon,  iTunes, and Microsoft Store affiliate links!

This is a programmatic method for building links. Learn about the the differences between manual and programmatic links here.

Please note: 

  • To confirm the snippet is working, hover over a published Amazon, Google Play, Microsoft Store, or iTunes link on your site, and it will display buy.geni.us as the destination instead of the original iTunes, Google Play, Microsoft Store or Amazon link.

How to use the Javascript Snippet Wizard.

1. Navigate to the Tools tab within your Geniuslink Account.

2. Under Embed Geniuslink in your Website select 

3. Once here, select the Group where you would like the clicks to be recorded.

4. If you're using our Custom Domain feature, select the domain that you would like to use for the Javascript Snippet. (Note: You will need to set up your custom domain with the Geniuslink Service prior to completing this step). 

5. Next, select which type of links you would like to translate.

6. Leave the Preserve existing affiliate settings checkbox UNCHECKED unless you have Amazon links with existing affiliate parameters already on your site, and do NOT want to overwrite them with the Affiliate parameters that you have entered into your Geniuslink Account. 

7. Check the Preserve URLs until click time checkbox if you want your links to remain unconverted when the page loads, and only localize once a user clicks your links.

8. Once you are finished customizing your JavaScript Snippet, simply copy the provided code, and paste it into the header of each page on your website (or into your header template).

9. Once it is placed within the header, all of the Amazon Google Play, Microsoft Store, and/or iTunes links within your website will automatically be converted to buy.geni.us links as soon as the page loads.

Using a WordPress Site?

Check out our easy to implement Amazon Link Engine and iTunes Link Engine plugins.

However, if you would prefer to use the JavaScript Snippet itself on your Wordpress site, please follow these instructions.

Did this answer your question?