• Resolved Reggy

    (@fluxwavez)


    When I use Autoptimize and check the option “Also aggregate inline JS?”, that seems to remove Amazon custom thumbnails which I use for certain posts on my site. I’ve tried excluding the specific script from Autoptimize, but it does not seem to return. The Amazon widget only returns when I disable aggregate inline JS.

    Example of code for that widget:

    <script type="text/javascript">
    amzn_assoc_placement = "adunit0";
    amzn_assoc_tracking_id = "persocentr-20";
    amzn_assoc_ad_mode = "manual";
    amzn_assoc_ad_type = "smart";
    amzn_assoc_marketplace = "amazon";
    amzn_assoc_region = "US";
    amzn_assoc_linkid = "***";
    amzn_assoc_design = "in_content";
    amzn_assoc_asins = "B07G7YP27Q,1927925258";
    </script>
    <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US"></script>

    I’ve tried excluding “//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US” and “onejs”, but those did not fix the issue.

    This code has not been removed from the linked page, but the widget is not visible because aggregating inline JS is currently enabled.

    • This topic was modified 7 years, 1 month ago by Reggy.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    try adding e.g. persocentr-20 to the comma-separated JS optimization exclusion list, or amzn_assoc_linkid or z-na.amazon-adsystem.com. lots to choose from, any (semi-)unique string in the inline JS should be good 🙂

    hope this helps,
    frank

    Thread Starter Reggy

    (@fluxwavez)

    Thank you, “persocentr-20” and “amzn_assoc_linkid” worked. I thought there was a specific script I was missing that I needed to find, but it was more accommodating that I thought.

    Thanks again.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome Reggy, feel free to leave a review of the plugin and support here! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Inline JS Amazon Question’ is closed to new replies.