• Resolved aliles

    (@aliles)


    Hi there, your plugin looks exactly what I think I need but i’m a complete noob to scripts etc. I have had the ads served on my site so I know it works.
    However, what I would like is either for an amazon banner ad (skyscraper style) in my sidebar that shows ads by one or two keywords from a couple of categories throughout the website (its just about one topic essentially or even better would be for the responsive Amazon Search Widget be used with your plugin so it can serve global ads (well, three countries anyway.

    Heres the aforementioned script with my id and keywords removed

    <script charset="utf-8" type="text/javascript">
    amzn_assoc_ad_type = "responsive_search_widget";
    amzn_assoc_tracking_id = "";
    amzn_assoc_link_id = "";
    amzn_assoc_marketplace = "amazon";
    amzn_assoc_region = "GB";
    amzn_assoc_placement = "";
    amzn_assoc_search_type = "search_widget";
    amzn_assoc_width = "auto";
    amzn_assoc_height = "auto";
    amzn_assoc_default_search_category = "";
    amzn_assoc_default_search_key = "";
    amzn_assoc_theme = "light";
    amzn_assoc_bg_color = "FFFFFF";
    </script>
    <script src="//z-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1&MarketPlace=GB"></script>

    Would be greatful for any help, many thanks.

    https://wordpress.org/plugins/amazon-link/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    The plugin can support what you need, simply create a new Template say called ‘search widget’ and put the script above into its content box.

    To work properly you need to change the tracking_id to %TAG% and the region to %MPLACE% and the search_key to %TEXT%, and update the script at the end. Not sure what the link_id is for?

    So it becomes:

    <script charset="utf-8" type="text/javascript">
    amzn_assoc_ad_type = "responsive_search_widget";
    amzn_assoc_tracking_id = "%TAG%";
    amzn_assoc_link_id = "OSXOOGQQTSSPRPEW";
    amzn_assoc_marketplace = "amazon";
    amzn_assoc_region = "%MPLACE%";
    amzn_assoc_placement = "";
    amzn_assoc_search_type = "search_widget";
    amzn_assoc_width = "auto";
    amzn_assoc_height = "auto";
    amzn_assoc_default_search_category = "";
    amzn_assoc_default_search_key = "%TEXT1%";
    amzn_assoc_theme = "light";
    amzn_assoc_bg_color = "FFFFFF";
    </script>
    <script src="//z-%REGION%.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1&MarketPlace=%MPLACE%">
    </script>

    Then in your sidebar add a standard WordPress text widget and in the content add the shortcode:

    [amazon template=search widget&text=search keywords go here]

    Obviously change the ‘search keywords go here’ to something relevant.

    This will then localise the script for you visitors, not sure this script works in all locales though?

    Paul

    Thread Starter aliles

    (@aliles)

    Hi Paul

    Many thanks for your prompt response and for the idiots guide to shortcodes and scripts!!

    I have the widget showing up but rather than the search field showing my keyword it just show a - which can be deleted and then the keyword entered manually. I can’t see any rogue hyphen anywhere in the script, but i’m no expert obviously. Heres the exact code i’ve used (I changed that link id to the original but made no difference):

    [amazon template=search widget&text=bipolar]

    <script charset="utf-8" type="text/javascript">
    amzn_assoc_ad_type = "responsive_search_widget";
    amzn_assoc_tracking_id = "%TAG%";
    amzn_assoc_link_id = "R5RI6ZMI4XQR3OEV";
    amzn_assoc_marketplace = "amazon";
    amzn_assoc_region = "%MPLACE%";
    amzn_assoc_placement = "";
    amzn_assoc_search_type = "search_widget";
    amzn_assoc_width = "auto";
    amzn_assoc_height = "auto";
    amzn_assoc_default_search_category = "";
    amzn_assoc_default_search_key = "%TEXT1%";
    amzn_assoc_theme = "light";
    amzn_assoc_bg_color = "FFFFFF";
    </script>
    <script src="//z-%REGION%.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1&MarketPlace=%MPLACE%">
    </script>

    The affected website is at http://latestbipolarnews.info The top advert is the Amazon one with yours underneath.

    Thanks again.

    Alan.

    Plugin Author paulstuttard

    (@paulstuttard)

    Oops,

    Sorry my fault, cut and paste error, the ‘TEXT’ keyword has to match between the shortcode and the template:

    So change the shortcode to be:

    [amazon template=search widget&text1=bipolar]

    Note the text is now text1 matching the keyword in the template %TEXT1%.

    So say you wanted to change the search category you could add the keyword text2 to the shortcode and %TEXT2% to the template.

    amzn_assoc_default_search_category = "%TEXT2%";

    Cheers,

    Paul

    Thread Starter aliles

    (@aliles)

    Aha that works perfectly thank you Paul.

    Only downside is, as you suspected, it shows UK results from other countries 🙁

    Do any of your templates work in a similar way? ie: show results by keyword but globally?

    Otherwise I could try a UK and US widget (i’m signed up to US & Canada too) and see how that works. Its a brand new site with no traffic so not sure where traffic is going to come from yet.

    Thread Starter aliles

    (@aliles)

    Scrap that idea, doesn’t work…..

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    It should work for the US, but I get nothing for Canada (as the widget does not support the CA market place). Works okay for fr and de, but not es or it.

    Check you have localisation and ip2nation database installed okay?

    If you install the Amazon Link > Extras > Spoof Locale plugin, you can test all locales by adding ?spoof_locale=ca to the end of the page’s URL.

    e.g. http://latestbipolarnews.info/?spoof_locale=ca

    Paul

    Thread Starter aliles

    (@aliles)

    Hi Paul

    I must thank you so much for your efforts but unfortunately something has gone wrong now!! Its obviously something I have done and I give up now after going round in circles trying to work out the issue. I just get an empty text widget now.

    I’ll use the Amazon widget as is, and use your templates in the posts once I get some traffic generated. I only have three Associate IDs setup so I hope you can profit from the others eventually as payment for your patience and hard work.

    Thanks again, Alan.

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Looking at my setup again, I noticed that the ‘search widget’ template must be of type “No ASIN”.

    Also note the the browser might recognise the javascript as being from Amazon and Ad-block software may remove it.

    Paul

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Amazon Search Widget’ is closed to new replies.