- This topic has 24 replies, 2 voices, and was last updated 3 years ago by David.
-
AuthorPosts
-
October 6, 2019 at 8:00 pm #1027963Anthony
I’m trying to insert an Amazon affiliate native ad inside a hook to display it just before the comments container. I can’t get it to show up.
There’s 4 types of ads. two of them are just links, one is an iframe, but this native one is a script.
Can you not show script unless it’s in the header or footer script hook?
October 7, 2019 at 5:20 am #1028227DavidStaffCustomer SupportHi there,
i can see some affiliate ads before the comments container – maybe browser cache needs clearing?
October 7, 2019 at 8:06 am #1028498AnthonyHey David,
I ended up putting one of the other four types of ads in there until I’m able to show the <script> inside the hook.
The four ad types are “Text, Image, Text & Image and Native Ads”.
Native ads is a script while the other three are text and iFrames.
October 7, 2019 at 8:52 am #1028540DavidStaffCustomer SupportSo the script works if you move it to another hook?
October 7, 2019 at 8:02 pm #1028931AnthonyNo, sorry.
It’s not working in any hook.
It’s an Amazon Associates – Native Shopping Ad.
It’s an <iFrame>.
I was hoping to display the Native Shopping Ad using a hook to insert it onto my pages.
Anthony
October 8, 2019 at 7:30 am #1029276DavidStaffCustomer SupportCan you share the code you’re adding here?
Before submiting – if you can highlight the code and click the Code Button to preserve its formatting.Aside of that – silly question have you selected the correct display rules….
October 9, 2019 at 8:17 am #1030395AnthonyHey Dave,
This is the script here:
<script type="text/javascript"> amzn_assoc_tracking_id = "mini08-20"; amzn_assoc_ad_mode = "manual"; amzn_assoc_ad_type = "smart"; amzn_assoc_marketplace = "amazon"; amzn_assoc_region = "US"; amzn_assoc_design = "enhanced_links"; amzn_assoc_asins = "1623156610"; amzn_assoc_placement = "adunit"; amzn_assoc_linkid = "cf585f0c564164615825dc4c9b944d54"; </script> <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US"></script>
I have it set to display on all “recipes” which is a custom post.
Anthony
October 9, 2019 at 8:28 am #1030411DavidStaffCustomer SupportThe hook is working as i can see the script in the markup.
But there is an error in the console related to theonejs
script that is being called.You would need to speak with the provider to find out what the possible causes are.
Before doing so worth clearing and disabling any cache plugins just in case there causing a conflict.October 9, 2019 at 8:39 am #1030424AnthonyHmm.
Am I contacting cloudfare, my host, or the recipe plugin developer?
Seems to be a few console errors I was unaware of.Thanks
October 9, 2019 at 8:51 am #1030429DavidStaffCustomer Supportthe error is related to the amazon script – so i would seek amazons ad service support.
But its worth eliminating any possibility it is server / cloudflare related first.October 9, 2019 at 9:00 am #1030433DavidStaffCustomer SupportI had a look around and this is the amazon guide to adding them:
https://affiliate-program.amazon.com/help/topic/t405
They recommend using the AdInserter plugin – not sure why that would make a difference but worth giving that a shot to see if it works.
Also what happens if you add the script within the post content itself?
October 16, 2019 at 11:00 am #1036521AnthonyHey David,
Sorry for the delay.
It’s not working right in the content either, weird.
It’s annoying. About a month or two ago I could paste these and I swear they worked.
October 16, 2019 at 11:14 am #1036530AnthonyAfter digging around I found this answer here:
https://stackoverflow.com/questions/49851104/how-to-load-script-in-react-component/50843982#50843982
Which lead to this:
https://www.npmjs.com/package/postscribe
Which I’m having a hard time understanding.
October 16, 2019 at 11:18 am #1036534DavidStaffCustomer SupportCan you point me to what lead you to the first stackoverflow link ?
Async JS will remove render blocking but not sure it explains why its not loading at all.October 16, 2019 at 11:20 am #1036535AnthonyI pasted the JS error into Google.
-
AuthorPosts
- You must be logged in to reply to this topic.