Mouser Buy Button

1. Overview and Samples

The Mouser Buy Button is an easily embeddable and dynamic image for your web site that displays the real-time availability of a specific product from Mouser Electronics. When the button is clicked, a user is directed to the product's detail page, on Mouser's website, where they can find additional product information and purchase the item.

SAMPLES

Template 1

Template 2

2. Integration

To integrate the Mouser Buy Button, simply add the HTML code below to your site. The code snippet has several parameters (in red) and variables (in blue) that must be configured so the correct data is displayed, and the button directs users to the correct detail page.

<a href="https://www.mouser.com/en/c/?q=2N2222A&m=Microchip" target="_blank"><img src="https://buybutton.services.mouser.com/GenerateButton?partnumber=2N2222A&manufacturer=Microchip&templateid=1&languagecode=en&stype=1"></a>
<a href="https://www.mouser.com/es/c/?q=2N2222A&m=Microchip" target="_blank"><img src="https://buybutton.services.mouser.com/GenerateButton?partnumber=2N2222A&manufacturer=Microchip&templateid=1&languagecode=es&stype=1"></a>

Note: Refer to the documentation below for acceptable values for the required parameters and variables.

3. Anchor Tag (<a>)

The anchor tag contains the URL that users will be directed to when clicking the button. In order for this link to work properly, the following parameters and variables are required:

  1. Subdomain: www - Depending on your language preference, you will need to insert the appropriate country code. Refer to the "Supported Languages" section below for acceptable values.

    Example: If your desired language is Czech, then the country code "cz" should be used in place of www.

  2. Part Number: q - This should be replaced with the part number you want to display the availability for. In the code snippet above, 2N2222A is the part number being searched on.

    NOTE: This value must match the partnumber parameter in the img tag (see below).

  3. Supplier Name: m - This should be replaced with the supplier name exactly how it appears on Mouser's website. In the code snippet above, Microchip is the supplier name being used.
  4. NOTE: This value must match the manufacturer parameter in the img tag, except when searching All Manufacturers (see below). If you want to search All Manufacturers, this parameter should be omitted.

4. Image Tag (<img>)

The image tag contains the URL that to the service that dynamically gathers product availability data and dynamically builds the image/button. In order for this to work properly, the following parameters and variables are required:

  1. partnumber - The part number you would like to do a search for.

  2. manufacturer - The name of a manufacturer you would like to do a search on. To search across all manufacturers, use the value "All Manufacturers".

    NOTE: Click Here to view a listing of all manufacturers.

  3. templateid - Valid values are either "1" or "2" (1 = Square layout, 2 = Rectangular layout).

  4. languagecode - Valid values are listed in the languages table below.

  5. stype - The type of product search to conduct. Valid values are either "0" or "1" (0= Wild Card, 1 = Exact Match).

    5. Supported Languages

    Language Code Language Country Code Country Base Url Language Code
    en English www United States en, es
    en English au Australia en
    de German at Austria de, en
    fr French be Belgium fr, en
    pt Portuguese br Brazil pt, en
    en English ca Canada en
    chs Simplified Chinese cn China zh, en
    cs Czech cz Czech cs, en
    en English dk Denmark en
    en English fi Finland en
    fr French fr France fr, en
    de German de Germany de, en
    en English gr Greece en
    cht Traditional Chinese hk Hong Kong zh, en
    en English hu Hungary en
    en English in India en
    en English ie Ireland en
    en English il Israel en
    it Italian it Italy it, en
    ja Japanese jp Japan ja, en
    lv Latvian lv Latvia lv, en
    de German li Liechtenstein de, en
    lt Lithuanian lt Lithuania lt, en
    fr French lu Luxembourg fr, en
    en English my Malaysia en
    es Spanish mx Mexico es, en
    nl Dutch nl Netherlands nl, en
    en English nz New Zealand en
    en English no Norway en
    fil Filipino ph Philippines fil, en
    pl Polish pl Poland pl, en
    pt Portuguese pt Portugal pt, en
    ru Russian ru Russian Federation ru, en
    en English sg Singapore en
    en English za South Africa en
    ko Korean kr South Korea ko, en
    es Spanish es Spain es, en
    sv Swedish se Sweden sv, en
    de German ch Switzerland de, en
    cht Traditional Chinese tw Taiwan zh, en
    th Thai th Thailand th, en
    tr Turkish tr Turkey tr, en
    en English gb United Kingdom en
    vi Vietnamese vn Vietnam vi, en